|
如果通过验证返回true,否则返回false
*/
function isDecimal( str,l,d ){
if(isInteger(str)) {
if (l==null) return true;
if (str<0) l--;
if (str.length<=l) return true;
}
var re = /^[-]{0,1}(\d+)[\.]+(\d+)$/;
if (re.test(str)) {
if (l==null) return true;
if (d==null) d=0;
if(RegExp.$1==0&&RegExp.$2==0) return false;
if (RegExp.$1.length+RegExp.$2.length<=l
&& RegExp.$2.length<=d) return true;
}
return false;
} onclick="isNull('Co.PageForm.CompetitorName');"
<< 上一页 [11] [12] [13] [14] [15] [16] |