Text.blur() : Text Object : Form JAVASCRIPT TUTORIALS


JAVASCRIPT TUTORIALS » Form » Text Object »

 

Text.blur()







The blur() method removes focus from the text box.












<html>
    <head>
    <script language="JavaScript">
    <!--
    function removeFocus(){
      document.myForm.myText.blur();
    }
    -->
    </script>
    </head>
    <body>
    <b>Highlight some of the text in the following text box:</b>
    <P>
    <form name="myForm">
      <input type=TEXT value="hello world" name="myText">
      <input type=BUTTON value="Click to Remove Focus" name="myButton"
             onClick="removeFocus()">
    </form>
    </body>
    </html>







HTML code for linking to this page:

Follow Navioo On Twitter

JAVASCRIPT TUTORIALS

 Navioo Form
» Text Object