<script language="javascript">
function val() {
if (f1.messageid.value == "") {
alert("messageid不能为空");
document.f1.messageid.focus();
return flase;
}
}
</script>
<form action="" name="f1" method="post" οnsubmit="return val()">
<input type="text" name="messageid">
<button type="submit"">
提交
</button>
<br>
<div id ="mesg1"></div>
</form>
javascript alert 初级
最新推荐文章于 2024-08-17 23:10:04 发布