🌈 搜索
📅  最后修改于: 2020-11-02 02:34:29             🧑  作者: Mango
'disabled'是HTML中标记的属性,用于表示按钮已禁用。它是一个布尔属性。禁用的按钮不能用于单击,它显示为灰色。
Text you want to show on the button
示例:以下示例使用不同的按钮并使它们禁用。
示例1:下面的示例禁用提交按钮。
Example of Submit Disabled Registration Form Firstname: Middlename: Lastname: Gender : Male Female Other Email: In this example, the disabled attribute is used to disable the Submit button. If you click on the "Submit Form" button, without filling the values, then it will not show the constraints included. Submit Form 输出: 示例2:以下示例禁用了重置按钮。 Example of Reset button disabled Registration Form Firstname: Middlename: Lastname: Gender : Male Female Other Email: In this example, the disabled attribute is used to disable the Reset button. If you fill the form and then click on the 'Reset a form' button, then it will not reset the values of the above form. Reset a Form 输出: 浏览器支持 Element Chrome IE Firefox Opera Safari Yes Yes Yes Yes Yes
输出:
示例2:以下示例禁用了重置按钮。
Example of Reset button disabled Registration Form Firstname: Middlename: Lastname: Gender : Male Female Other Email: In this example, the disabled attribute is used to disable the Reset button. If you fill the form and then click on the 'Reset a form' button, then it will not reset the values of the above form. Reset a Form 输出: 浏览器支持 Element Chrome IE Firefox Opera Safari Yes Yes Yes Yes Yes