帮我看一下这代码不生效
<script language= "javascript ">
<!--
function check(form1)
{var notnull
notnull=true
if (form1.gsmc.value== " ");
{window.alert( "公司名称不能为空 ");
document.form1.gsmc.focus();
notnull=false
else if
if (form1.lxr.value== " ");
{window.alert( "联系人不能为空 ");
document.form1.lxr.focus();
notnull=false
else if
if (form1.tel.value== " ");
{window.alert( "联系电话不能为空 ");
document.form1.tel.focus();
notnull=false
else if
if (form1.xxdz.value== " ");
{window.alert( "联系地址不能为空 ");
document.form1.xxdz.focus();
notnull=false
else if
if (form1.mail.value== " ");
{window.alert( "E-MAIL不能为空 ");
document.form1.mail.focus();
notnull=false}
}
}
}
}
}
//-->
</script>
------解决方案--------------------function check(form1){
if (form1.gsmc.value== " ") {
window.alert( "公司名称不能为空 ");
document.form1.gsmc.focus();
return false;
} else if (form1.lxr.value== " ") {
window.alert( "联系人不能为空 ");
document.form1.lxr.focus();
return false;
} else if (form1.tel.value== " ") {
window.alert( "联系电话不能为空 ");
document.form1.tel.focus();
return false;
} else if (form1.xxdz.value== " ") {
window.alert( "联系地址不能为空 ");
document.form1.xxdz.focus();
return false;
} else if (form1.mail.value== " ") {
window.alert( "E-MAIL不能为空 ");
document.form1.mail.focus();
return false
}
}