Mega Code Archive

 
Categories / JavaScript Tutorial / Form
 

Textarea blur()

The blur() method removes the focus from the text area. <html>     <head>     <script language="JavaScript">     <!--     function removeFocus(){       document.myForm.myTextArea.blur();     }     -->     </script>     </head>     <body>     <b>Highlight some of the text in the following text area:</b>     <P>     <form name="myForm">       <textarea name="myTextArea" rows=6 cols=50>       Here is some text in my text area.       </textarea>       <input type=BUTTON value="Click to Remove Focus" name="myButton" onClick="removeFocus()">     </form>     </body>     </html>