function chk() {
var patrn = /^\d+(\.\d+)?$/;
var result = true;
$("input[type=text]").each(function () {
if (!patrn.exec(this.value)) {
alert("请输入正确的数字!");
result = false;
}
})
return result;
}