View Full Version : make checkbox checked
how do I make a checkbox checked by default
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
Alan @ CIT
24 Nov 2005, 17:54
Add:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
to the <input> tag.
Marco van Herwaarden
24 Nov 2005, 21:20
Isn't it just "checked"?
And you would be breaking the progam logic. The following is already setting checked if it is needed:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
If you want to change the behaviour, i suggest you look into the code.
I think some people used checked="checked" because its believed to be necessary. Ive only ever used checked or selected, though.
Marco van Herwaarden
24 Nov 2005, 22:28
Lol not all browser like the checked=checked
This is normal HTML syntax.
<input type="radio" name="Typ" value="bla" checked>
However, to be XHTML-compliant you should use it like this
<input type="radio" name="Typ" value="bla" checked="checked">
Thomas
vBulletin® v3.6.12, Copyright ©2000-2012, Jelsoft Enterprises Ltd.