1, with pictures instead of submitting button submit and reset button Reset, to the picture plus the onclick event
<script language= "JavaScript" >
function Fsubmit (obj) {
Obj.submit ();
}
function Freset (obj) {
Obj.reset ();
}
</script>
<form id= "Form1" Name= "Form1" method= "Post" action= "Login.asp" >
Name: <input type= "text" name= "TextField"/>
</form>
2, to 1 of the picture plus style, used to make up for the method 1 mouse moved to the picture no response, failed to give customers a good browsing experience
<script language= "JavaScript" >
function Fsubmit (obj) {
Obj.submit ();
}
function Freset (obj) {
Obj.reset ();
}
</script>
<form id= "Form1" Name= "Form1" method= "Post" action= "Login.asp" >
Name: <input type= "text" name= "TextField"/>
</form>
3, with pictures instead of submitting button submit and reset button Reset, and add links, the effect of the same 2
<script language= "JavaScript" >
function Fsubmit (obj) {
Obj.submit ();
}
function Freset (obj) {
Obj.reset ();
}
</script>
<form id= "Form1" Name= "Form1" method= "Post" action= "Login.asp" >
Name: <input type= "text" name= "TextField"/>
<a href= "Javascript:fsubmit (DOCUMENT.FORM1);" ></a>
<a href= "Javascript:freset (DOCUMENT.FORM1);" ></a>
</form>
4, the use of image fields. Because the default image fields are submitted by clicking on the form, the appropriate processing is done:
<script language= "JavaScript" >
function Fsubmit (obj) {
Obj.submit ();
}
function Freset (obj) {
Obj.reset ();
}
</script>
<form id= "Form1" Name= "Form1" method= "Post" action= "Login.asp" >
Name: <input type= "text" name= "TextField"/>
<input type= "image" Name= "ImageField" onclick= "Javascript:fsubmit (Document.form1); return false;" Src= "uploads/ 200707/30_145425_001.jpg ">
<input type= "image" Name= "ImageField2" onclick= "Javascript:freset (Document.form1); return false;" Src= "uploads/ 200707/30_145428_002.jpg ">
</form>
Note that the form submission and reset events in JS must be added (), such as Submit () and reset ()