📜  HTML Button

📅  最后修改于: 2020-11-04 00:53:12             🧑  作者: Mango

HTML

type是

以下是type属性的三个值:

  • 按钮:按钮值用于可单击的按钮。
  • 提交:提交值用于提交表单数据。
  • 重置:重置值用于将表单的值重置为其初始值。

例:






Example of Button Type




Registration Form



Male Female Other
The below button displays as the submit button, which is used to submit the form. The below button displays the reset button, which is used to reset the form to its initial values. The below button displays a message on a web page when you click on it. After clicking on a button, a function is called from the script tag.

输出:

浏览器支持

Element chrome browser Chrome ie browser IE firefox browser Firefox opera browser Opera safari browser Safari
Yes Yes Yes Yes Yes