logo

Botón HTML deshabilitado

El ' desactivado ' es un atributo de etiqueta en HTML, que se utiliza para indicar que el botón está deshabilitado. Es un atributo booleano. El botón deshabilitado no se puede utilizar para hacer clic y aparece en color gris.

Sintaxis

 Text you want to show on the button 

Ejemplos: Los siguientes ejemplos utilizan diferentes botones y los desactivan.

intenta atrapar en java

Ejemplo 1: El siguiente ejemplo desactiva el botón de enviar.

 Example of Submit Disabled /* The following tag selector body use the font-family and background-color properties for body of a page*/ body { font-family: Calibri, Helvetica, sans-serif; background-color: pink; } /* Following container class used padding for generate space around it, and also use a background-color for specify the color lightblue as a background */ .container { padding: 50px; background-color: lightblue; } /* The following tag selector input uses the different properties for the text filed. */ input[type=text] { width: 100%; padding: 15px; margin: 5px 0 22px 0; display: inline-block; border: none; background: #f1f1f1; } input[type=text]:focus { background-color: orange; outline: none; } div { padding: 10px 0; } /* The following tag selector button uses the different properties for the Button. */ button { color: red; padding: 16px 20px; margin: 8px 0; border: none; cursor: pointer; width: 100%; opacity: 0.9; } Firstname: Middlename: Lastname: Gender : <br> 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 &apos;Reset a form&apos; button, then it will not reset the values of the above form. Reset a Form 
Pruébalo ahora

Producción:

comparar cadenas java
Botón HTML deshabilitado

Soporte del navegador

Elemento navegador cromoCromo es decir, navegadorES DECIR navegador firefoxFirefox navegador de óperaÓpera navegador safariSafari