Check Boxes

Since a checkbox is selected/deselected with a mouse click, the onClick event will trigger your function whenever the checkbox is changed. Each checkbox has a property called

checked

which is equal to true or false depending on whether the box is currently checked. This example runs a function when the box is clicked, and displays a message if the box is checked.

function rushbox(checked) {
    if (checked == true) {
        alert(" LIFT OFF! ")
    }
}
<FORM>
    <INPUT TYPE=checkbox NAME="rush" OnClick="rushbox(form.rush.checked)"> "Rush this order"
</FORM>

results matching ""

    No results matching ""