时间: 2021-07-31 作者:daque
//存户端对用户输出数据校验 //即使输出的实质不满意,则不提交,而且中心机动跳到该场所。 //比发送此后在效劳器端校验数据要好用的多! 剧本代码:<script language="javascript"> <!-- function juge(theform) { if (theform.title.value == "") { alert("请输出题目!"); theform.title.focus(); return (false); } if (theform.detail.value == "") { alert("请输出实质!"); theform.detail.focus(); return (false); } if (theform.name.value == "") { alert("请输出作家!"); theform.name.focus(); return (false); } if (theform.email.value == "") { alert("请输出邮箱!"); theform.email.focus(); return (false); } } --> </script>