Check Boxes:
Check boxes are usually use to know the interest of any users. Suppose you want to know about users which type of fruits they like and you have 4 check boxes user either check one or more than one it's depend on user.
Attributes of Check Boxes:
type="checkbox"
name="something"
value="something"
checked="yes" or "no"
If you are making a list of fruits then name all the check boxes fruit which is essential for the script languages. Don't panic it's just a reference.
Check Boxes Example:
This is the code for making check boxes i made 4 check boxes have different values stored behind their check.Check boxes are usually use to know the interest of any users. Suppose you want to know about users which type of fruits they like and you have 4 check boxes user either check one or more than one it's depend on user.
Attributes of Check Boxes:
type="checkbox"
name="something"
value="something"
checked="yes" or "no"
If you are making a list of fruits then name all the check boxes fruit which is essential for the script languages. Don't panic it's just a reference.
Check Boxes Example:
<p>Please select every fruit that you eat.</p>
Apple: <input type="checkbox" name="fruit" value="apple" /><br />
Banana: <input type="checkbox" name="fruit" value="banana" /><br />
Grapes: <input type="checkbox" name="fruit" value="grapes" /><br />
Cherry: <input type="checkbox" name="fruit" value="cherry" />
Apple: <input type="checkbox" name="fruit" value="apple" /><br />
Banana: <input type="checkbox" name="fruit" value="banana" /><br />
Grapes: <input type="checkbox" name="fruit" value="grapes" /><br />
Cherry: <input type="checkbox" name="fruit" value="cherry" />
Check Boxes Example:
Please select every fruit that you eat.
Apple:
Mango:
Grapes:
Cherry:
Grapes: <input type="checkbox" name="fruit" value="grapes" /><br />
Cherry: <input type="checkbox" name="fruit" value="cherry" checked="yes" />
Already Checked Example:Cherry: <input type="checkbox" name="fruit" value="cherry" checked="yes" />
Grapes:
Cherry:
Just add another attribute to you check box checked="yes" then it will already selected shown to user. It's use in must select this, choices that it has to be selected.Cherry:
Comments
Post a Comment