1. Code:
Copy codeThe Code is as follows: <% --
Document: index
Created on:, 13:56:46
Author: lucifer
-- %>
<! Doctype html public "-// W3C // dtd html 4.01 Transitional // EN">
<Html>
<Head>
<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>
</Head>
<Body bgcolor = "# c0c0c0" link = "#999999" alink = "#999999" vlink = "#999999"
Onload = "giveFocus ()">
<Center>
<Font size = "+ 2">
<Br>
<B> LOGIN </B>
</Font>
<Br>
<Form name = "login" method = "post"
Action = "http://wenda.tianya.cn/wenda/thread? Tid = 129583d1f709f89f ">
& Lt; table width = "50%" & gt;
<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>
<Font size = "+ 1">
<B>
<Input type = "button" value = "LOGIN" onclick = "submitForm ()">
<Input type = "button" value = "RESET" onclick = "resetForm ()">
<Br>
</B>
</Font>
</Form>
</Center>
</Body>
</Html>
2. Conclusion:
"Formname ". role of submit () and <input type = "submit" ......> if the button and submit both exist, only submit can submit the form.