There are four ways to draw a button on a page:
- <input type= "button"/> this is a button. If you don't write JavaScript, nothing will happen if you press down.
- <input type= "Submit"/> such a button the user will automatically submit the form after clicking, unless you have written JavaScript to block it.
- <button> This button in the form will also click Auto-Submit, than the first two advantage is that the content of the button can not only have text, but also can have pictures and other multimedia content. (Of course, the first two can be done with a picture background). The disadvantage is that different browsers get different value values, and there may be other browser compatibility issues (Ge Liang).
- Other tags, such as A, IMG, span, Div, and then use the picture to disguise it as a button.
Wang Honglei
Links: http://www.zhihu.com/question/20839977/answer/16354924
Source: Know
Copyright belongs to the author. Commercial reprint please contact the author for authorization, non-commercial reprint please specify the source.
What is the difference between input type= "submit" and "button"?