How to set Checkbox readonly

In some rare cases you may want to make a checkbox readonly.
In my case I had to explain what does a checkbox had on a site.
One option is to use the attribute "disabled"="disabled" but this makes the checkbox greyed out.
If you want to make readonly here is how to do it.

<input checked="checked" name="documenti[]" onclick="return false;" type="checkbox" value="valore" />

;)

Commenti

Post popolari in questo blog

Solaris 10: How to restart network service without reboot

How to send e-mail using PHP and mail() with Linux Debian