1. Code:
Copy Code code as follows:
<%--
Document:index
Created on:2009-10-4, 13:56:46
Author:lucifer
--%>
<! DOCTYPE HTML PUBLIC "-//w3c//dtd HTML 4.01 transitional//en" >
<title></title>
<meta http-equiv= "Content-type" content= "text/html; Charset=utf-8 ">
<script type= "Text/javascript" >
function Givefocus () {
Document.login.user.focus ()
}
function SubmitForm () {
Document.login.submit ()
}
function Resetform () {
Document.login.reset ()
Document.login.user.focus ()
}
</script>
<body bgcolor= "#c0c0c0" link= "#999999" alink= "#999999" vlink= "#999999"
Onload= "Givefocus ()" >
<center>
<font size= "+2" >
<br><br>
<B>LOGIN</B>
</font>
<br><br><br><br>
<form name= "Login" method= "POST"
action= "http://wenda.tianya.cn/wenda/thread?tid=129583d1f709f89f" >
<table width= "50%" >
<tr>
<TD align= "Right" >
<font size= "+1" >
<b>user id</b>
</font>
</td>
<td>
<font size= "+1" >
<input type= "text" name= "user" maxlength= "9" >
</font>
</td>
</tr>
<tr>
<TD align= "Right" >
<font size= "+1" >
<B>Password</B>
</font>
</td>
<td>
<font size= "+1" >
<input type= "password" name= "password"
Maxlength= "8" >
</font>
</td>
</tr>
</table>
<br><br><br>
<font size= "+1" >
<B>
<input type= "button" value= "LOGIN" onclick= "SubmitForm ()" >
<input type= "button" value= "RESET" onclick= "Resetform ()" >
<br>
</B>
</font>
</form>
</center>
</body>
2. Conclusion:
"FormName". Submit () is the same as <input type= "Submit" ......>, that is, submitting form data, if button and submit exist at the same time, only submit has the role of submitting a form