Search code examples
htmlcssyui

IE 11 disable="True" not working


Can anyone help me in knowing why disable="true" for a button doesn't work in Internet Explorer 11 whereas disable="disable" works? Also provide a solution which works both in IE 9 and IE 11.


Solution

  • The correct and easy way to disable buttons is by adding disabled attribute:

    <button>I am not disabled!</button>
    <br /><br />
    <input type="button" value="Disabled input" disabled/>
    <button disabled>I am disabled!</button>