input内强制保留小数点后两位 位数不足时自动补0 小数点后位数超出2位时进行四舍五入 需引入jquery包 1.11.2版本 1 function xiaoshu(x) 2 { 3 var f = parseFloat(x); 4 var f = Math.round(x*100)/100; 5 var s = f.toString(); 6 var rs = s.indexOf('.'); 7 if (rs < 0) { 8 rs = s.length; 9 s += '.'; 10 }
mysql int类型字段插入空字符串时自动转为0 如果不想转的话可以修改配置文件 修改 my.ini 文件. # Set the SQL mode to strictsql-mode=”STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION” 改为: # Set the SQL mode to strictsql-mode=”NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION”
create or replace trigger t before update on test5 for each rowbegin insert into test55 values (:old.id,:old.name);end ; -------------------------------------------------------------------------------------- --表中插入数据时ID自动增长 create table ttt (id numbe
输入手机号码时,自动添加空格,更容易辨别 public class PhoneWatcher implements TextWatcher { private EditText _text; public PhoneWatcher(EditText _text) { this._text = _text; } @Override public void beforeTextChanged(CharSequence s, int start, int count, int after) { } @
需求:新建缺陷时,自动生成缺陷状态.检查者和检查日期的值. 在脚本编辑器找到Defects_Bug_New函数,然后填写以下代码: Sub Defects_Bug_New On Error Resume Next Bug_Fields("BG_USER_06").Value = "1.新发现" Bug_Fields("BG_DETECTION_DATE").Value = Date() Fields("BG_DETECTI