提交表单的几种判断方法(1)
<script language="JavaScript"><!--
function xxg()
{
if (frm.t11.value=="")
{
alert("简介");
return false;
}}
//-->
</script>
</head>
<form method="POST" action="" onsubmit="return xxg();" name=frm>
<p><input type="text" name="t11" size="20">
<input type="submit" value="提交">
<input type="reset" value="重置" name="B2"></p>
</form>
----------------------------------------------
<script LANGUAGE="JavaScript">
function checkp()
{
if (document.Formp.t11.value=="")
{
alert("请输入注册的企业全称!")
document.Formp.t11.focus()
document.Formp.t11.select()
return
}
document.Formp.submit()
}
</SCRIPT>
<form method="POST" action="" name=Formp>
<input type="text" name="t11" size="20">
<input type="button" value="按钮" onclick="checkp()">
</form>
-------------------------------------------
<% P_password="12344"%>
<%
password=request.form("password")
if Request("password")<>"" then
if password=P_password then
session("logpassword")=password
session("fz_login") = "8"
response.write "你是神"
'response.end
else
%>
<script language=Javascript>
alert("错误!麻烦你认真一点,请重新输入!");
window.history.go(-1);
</script>
<%
end if
else
%>
<form method="post" action="rar.asp" name="form">
<input type="text" name="password" size="20">
<input type="submit" value="提交">
</form>
<% end if%>
补充:asp教程,高级应用