HTML Tags: image can also submit form!
!!
Image can also submit a form
Previously, the "<input type=" Submit "value=" Input_submit "/>" was often used to submit a form
There is such a feature in the development process today in the project:
Click "XXX" button to submit form form, but this commit button is a type= "image" input;
Looking for a long while didn't see this picture element bound to the JS submission form information.
Later to degree Niang asked, originally:"image can also submit form!!." "
PracticeIE8, Firefox 33.1)
Here are a few of my experiments (IE8, Firefox 33.1 run results are different ).
It is important to note that if the image tag is not used properly, there will be 2 commit problems
!
。 IE8, Firefox 33.1 version number Debug "</title><script type=" Text/javascript ">function formsubmit () {alert (" It is not a joke! It is true~~ ");d ocument.jokeForm.action =" Notajoke.do?method=justatest ";d ocument.jokeForm.submit (); return true;} </script>
HTML Tags: image can also submit form!!!