通过js怎么让浏览器在最小化时强制弹出显示

JavaScript013

通过js怎么让浏览器在最小化时强制弹出显示,第1张

可以用js控制最小化的浏览器窗口桔黄闪动提示新信息,控制title文字就行。具体如下:

//取title

var title = document.getElementsByTagName('title')[0]

//需要修改的时候,直接给innerHTML复制

var title.innerHTML = '这里在闪'。

真的不行,换句话,没有办法的。

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