//取title
var title = document.getElementsByTagName('title')[0]
//需要修改的时候,直接给innerHTML复制
var title.innerHTML = '这里在闪'。
JS控制浏览器窗口的大小代码之一:
<script>window.moveTo(0, 0)//移动窗口
window.resizeTo(800, 600)//改变大小
window.onresize=new Function("window.resizeTo(800, 600)")
</script>
JS控制浏览器窗口的大小代码之二:
<SCRIPT>if (window != top) top.location.href = location.href
self.resizeTo(800,600)
</SCRIPT>
JS控制浏览器窗口的大小代码之三:
<script language="javascript">function openWin()
{
var i=0
i = open("","","width=500,height=500")
}
</script>
JS控制浏览器窗口的大小代码之四:
<SCRIPT language=JavaScript>var new_width=800 //你要固定的浏览器宽度
var new_height=600 //你要固定的浏览器高度
function resizewindow()
{
window.resizeTo(new_width,new_height)
}
resizewindow()
</SCRIPT>
真的不行,换句话,没有办法的。<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/htmlcharset=utf-8">
<title>无标题文档</title>
<script type="text/javascript">
function isMinStatus() {
var isMin = false
if (window.outerWidth != undefined) {
isMin = window.outerWidth <= 160 &&window.outerHeight <= 27
}
else {
isMin = window.screenTop <-30000 &&window.screenLeft <-30000
}
return isMin
alert(111)
}
function notifyTeacher(){
alert('document.body.offsetTop:'+document.body.offsetTop+',document.body.offsetWidth:'+document.body.offsetWidth+',screen.availWidth:'+screen.availWidth+',top.screenTop:'+top.screenTop)
alert('window.screen.width:'+window.screen.width+',window.screen.height:'+window.screen.height+',window.screen.availWidth:'+window.screen.availWidth+',window.screen.availHeight:'+window.screen.availHeight)
alert(top.name)
alert(top.screenTop+'|'+top.screenLeft)
if(isMinStatus()){
window.focus()
}else{
document.focus()
}
}
</script>
</head>
<body onLoad="notifyTeacher()">
</body>
</html>