var cashpledge=$("#cashpledge").val();
var reg = /^\+?(?!0+(\.00?)?$)\d+(\.\d\d?)?$/;
var r = cashpledge.match(reg);
if (r == null) {
alert('对不起,只能输入价格');
} else {
window.location.href="__SELF__/cashpledge/"+cashpledge;
}
函数式编程
相关分类