<button type="button" name="theButton">SUBMIT</button>
和<input type="submit" value="SUBMIT" name="theButton" />
之间有主要的区别吗?
此外,您可以使用<button type="submit" name="theButton">SUBMIT</button>
吗?
这里有一个页面 描述了区别(基本上你可以将html放入 <button></button>
中)。
另一个页面 描述了人们为什么避免使用 <button></button>
(提示:IE6)。
参考:<button> vs. <input type="button" />。哪个应该使用?
还可以看一下这个关于按钮的幻灯片演示。
<button type="button" name="theButton">提交</button>
不会提交表单(忽略一些浏览器中的错误)。
<input type="submit" value="提交" name="theButton" />
将提交表单。
还可以使用
<button type="submit" name="theButton">提交</button>
吗?
将提交表单,但没有值(忽略IE中的错误)。