html - label not working with checkbox -



html - label not working with checkbox -

ok, missing? have:

<form> <input type="checkbox" name="showratings" value="1" checked> <label for="showratings">show ratings</label> </form>

and when click on "show ratings" text, checkbox not toggling. know it's simple.

i believe label element links id attribute, not name attribute. seek this:

<form> <input type="checkbox" name="showratings" id="showratings" value="1" checked> <label for="showratings">show ratings</label> </form>

reference here.

html

Comments

Popular posts from this blog

java - How to pass parameters between Request-Scoped Controllers? -

actionscript 3 - Flex: moving a point with rotation doesnt change the point XY? -

ms access - C# - Using OleDbParameter on table name -