[CODE]<html>
<head>
<script language="javascript">
function Page_Submit(Act)
{
document.form1.action+="?Action="+Act;
document.form1.submit();
}
function Page_Load()
{
<%
With Response
Select Case Request("Action")
Case "login"
.Write "alert('点击了登陆按钮');"
Case "regist"
.Write "alert('点击了注册按钮');"
End Select
End With
%>
}
</script>
</head>
<body onLoad="Page_Load();" >
<form name="form1" action="abc.asp" method="post">
<input type="text" name="UsName" >用户名
<input type="text" name="UsPwd" >密码
<input type="button" name="login" onClick="Page_Submit('login');" value="登陆">
<input type="button" name="regist" onClick="Page_Submit('regist');" value="注册">
</form>
</body>
</html>[/CODE]
将上面的页面保存为abc.asp