form表单点击后验证

function check(){

var customertype = document.getElementById("customertype");
//alert(customertype.value);
if(customertype.value == 0){
alert("没有输入客户关系度!");
customertype.focus();
return false;
}
return true;
}

 <form method="post" action="__URL__" onsubmit="return check()">

</form>

posted on 2015-08-24 13:25  liuwenbohhh  阅读(225)  评论(0编辑  收藏  举报