ITTreats.com
Enter your Search term and Hit "Enter"

Thu, 11 Mar 2010 9:51:46 AM +00:00

Latest 'ITTreats'


How to Make Read only Check Boxes

How to Make  Read only Check Boxes

How we can make a Chek box readonly? Even if we provide Readonly attribute you still can check or uncheck the checkbox..

then how we can make a CheckBox ReadOnly ??
Here is the simple solution,  we can do this  with Javascript. here is how it goes

write a onclick even for the desired checkbox, and  check weather it is checked , if it is check then make that checked as false vice versa

<input type=\”checkbox\” value=\”xyz\” checked onclick=\”javascript:if (this.checked==true) this.checked=false; else this.checked=true;\” />

Here is the example Below :

Try to Uncheck Me :

Simple is\’t it ??