mercredi 31 mai 2017

disabled="disabled" on input type checkbox doesn't work

I have the following code:

<div class="row" style="margin-top:1%;">
 <div class="col-md-12">
  <ul class="List">
    @foreach (var req in requests)
    {
     <li>
      <div>
        @if(req.Equals("Test"))
        {
         <label><input type="checkbox" onclick="setRequestor(this)" />@req</label>  
        }
        else
        {
         <label><input type="checkbox" disabled="disabled" />@req</label>   
        }
      </div>
     </li>
    }
  </ul>
 </div>
</div>

The Problem is that disabled="disabled" is always ignored. If I inspect the Code with Developer Tools I don't see the disabled attribute. I see only:

<input type="checkbox" /> 




Aucun commentaire:

Enregistrer un commentaire