Tuesday, December 11, 2018

How do I give a checkbox the readonly setting?

This suggests this which seems to work.

<input type="checkbox" onclick="return false;"/>

 
 

Addendum 12/15/2018: In Angular 2 and up...

<input type="checkbox" [disabled]="myBooleanVariableBackInTheComponent" />

No comments:

Post a Comment