87,993
社区成员
发帖
与我相关
我的任务
分享
大意了[/quote]嗯呢了解了,以后得多注意细节,谢啦
大意了
<!doctype html>
<html>
<head >
<script>
function checkform() {
var name = document.getElementById("none_name");
if (name.value != "") {
alert("请填写名字!");
return false;
};
};
</script>
<body>
<form action="submitpage.htm" onsubmit="return checkform()" method="post">
姓名: <input type="text" id="none_name">
<input type="submit" value="验证">
</form>
</body>
</html>