Checkbox.blur() : CheckBox : Form JAVASCRIPT TUTORIALS


JAVASCRIPT TUTORIALS » Form » CheckBox »

 

Checkbox.blur()









Syntax








document.form.checkbox.blur()



The blur() method removes the focus from a check box.












<html>
    <script language="JavaScript">
    <!--
    function removeFocus()
    {
      document.myForm.checkBox2.blur();
    }
    -->
    </script>
    <form name="myForm">
      I hold my focus after a click
      <input type="checkbox" name="checkBox1"><br>
      I cannot hold my focus after a click
      <input type="checkbox" name="checkBox2" onClick="removeFocus()">
    </form>

    </html>







HTML code for linking to this page:

Follow Navioo On Twitter

JAVASCRIPT TUTORIALS

 Navioo Form
» CheckBox