欢迎访问 生活随笔!

生活随笔

当前位置: 首页 > 编程资源 > 编程问答 >内容正文

编程问答

Focus 焦点定位

发布时间:2024/1/17 编程问答 51 豆豆
生活随笔 收集整理的这篇文章主要介绍了 Focus 焦点定位 小编觉得挺不错的,现在分享给大家,帮大家做个参考.

<html>
<head>
<title>焦点定位</title>
<script LANGUAGE="Javascript">
var newWindow = null
function makeNewWindow(){
    if (!newWindow || newWindow.closed)
    {
        newWindow = window.open("","","width=150,height=150");
        var newContent = "<html><head><title>新建窗口</title></head>";
        newContent += "<body bgColor='blue'><H1>一个新的窗体</H1>";
        newContent += "<form><INPUT TYPE='button' VALUE='切换一个新的窗体' onClick='self.opener.focus()'><BR><BR>";
        newContent += "<form><INPUT TYPE='button' VALUE='返回上一窗体' onClick='self.blur()'>";
        newContent += "</form></body></html>";
        newWindow.document.write(newContent);
        newWindow.document.close();
    }
    else
    {
        newWindow.focus();
    }
}
</script>
</head>
<body>
<form>
<INPUT TYPE="button" NAME="newOne" VALUE="打开新窗体" onClick="makeNewWindow()">
</form>
</body>
</html>

总结

以上是生活随笔为你收集整理的Focus 焦点定位的全部内容,希望文章能够帮你解决所遇到的问题。

如果觉得生活随笔网站内容还不错,欢迎将生活随笔推荐给好友。