' onemogućeno ' je atribut oznake u HTML-u koji se koristi za označavanje da je gumb onemogućen. To je Booleov atribut. Onemogućeni gumb ne može se koristiti za klikanje i pojavljuje se kao siva boja.
Sintaksa
Text you want to show on the button
Primjeri: Sljedeći primjeri koriste različite gumbe i onemogućuju ih.
onclick javascript
Primjer 1: Sljedeći primjer onemogućuje gumb za slanje.
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 'Reset a form' button, then it will not reset the values of the above form. Reset a FormTestirajte sada
Izlaz:
koliko je 10 od 1 milijuna
Podrška za preglednik
Element | Krom | tj | Firefox | Opera | Safari |
Da | Da | Da | Da | Da |