日期:2014-05-16 浏览次数:21169 次
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script language="JavaScript" type="text/JavaScript">
function myCheck()
{
for(var i=0;i<document.form1.elements.length-1;i++)
{
if(document.form1.elements[i].value=="")
{
alert("用户名和密码不能有空项");
document.form1.elements[i].focus();
return false;
}
}
return true;
}
</script>
</head>
<body>
<table style="width:570px; height:462px" align="center">
<tr><td >
<form id="form1" name="form1" method="post" action="2.asp" onsubmit="return myCheck()">
<table width="338" border="0" align="center" cellpadding="5" cellspacing="0">
<tr>
<td >user:<input name="user" type="text" class="username" id="user" size="30" />
</td>
</tr>
<tr>
<td class="title">password:<input name="pwd" type="password" class="password" id="pwd" size="30" />
</tr>
<tr>
<td align="right"><input type="image" src="/images/loginin.gif" onclick="this.form.submit()"/> </td>
</tr>
</table>
</form>
</td></tr>
</table>
</body>
</html>
<%
response.write"<SCRIPT language=JavaScript>alert('如果你看到我了,就表示上一个表单被提交到本页来了!');"
response.write"javascript:history.go(-1)</SCRIPT>"
response.end
%>