複製鏈接
請複製以下鏈接發送給好友

focus

(編程DOM方法)

鎖定
focus() 方法用於把鍵盤焦點給予一個窗口
外文名
focus
語    法
window.focus
實例
<html>
    <body>
        <script type="text/javascript"> 
            myWindow=window.open('','','width=200,height=100') 
            myWindow.document.write("This is 'myWindow'") 
            myWindow.focus()
        </script>
    </body>
</html>