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>