日期:2014-05-16 浏览次数:20309 次
<form name=check action=123.php method=post target="_blank">
<input size="30" type="text" id= "check" />
<button class="new-btn-login" type="submit" id="submit" style="text-align:center;">确 认</button>
</form>
$("#submit").click(function(){
var tfee = $("#check").val();
if(tfee == null || tfee ==""){
alert("xxxxx");
return;
}
reg='/^[1-9][0-9]*$/';
alert(reg.test(tfee));
if(!reg.test(tfee)){
alert("请输入正确格式");
return;
}
});