<html>
<head>
<script language="javascript">
function check()
{
if (document.all.txtName.value=="")
{
alert("请填写主题!");
document.all.txtName.focus();
return false;
}
return true
}
</script>
</head>
<body>
<input name="txtName" type="text" id="txtName" />
<input type="submit" name="btnSubmit" value="提交" id="btnSubmit" onclick="return check();" />
</body>
</html>
posted @ 2009-03-23 16:44 Der 阅读(1926) 评论(2)
编辑