开发者

Difference between button and input? [duplicate]

This question already has answers here: <开发者_运维百科;button> vs. <input type="button" />. Which to use? (16 answers) Closed 2 years ago.

Are there any major differences between <button type="button" name="theButton">SUBMIT</button> and <input type="submit" value="SUBMIT" name="theButton" />

Also, can you use <button type="submit" name="theButton">SUBMIT</button>?


Here's a page describing the differences (basically you can put html into a <button></button>

And an other page describing why people avoid <button></button> (Hint: IE6)

Reference: <button> vs. <input type="button" />. Which to use?

Also have a look at this slideshow about button.


<button type="button" name="theButton">SUBMIT</button>

Won't submit a form (bugs in some browsers aside)

<input type="submit" value="SUBMIT" name="theButton" />

Will submit a form.

Also, can you use <button type="submit" name="theButton">SUBMIT</button>?

Will submit a form, but doesn't have a value (bugs in IE aside)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜