首页javascripttextareaJavascript Form - 如何从文本区域中删除焦点

Javascript Form - 如何从文本区域中删除焦点

我们想知道如何从文本区域中删除焦点。


<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>
    <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>