浏览器最小化时右下角 消息提醒,点击消息最大化浏览器
//框架页面
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; } function notifyTeacher() { if (isMinStatus()) { var vArguments = window; var sFeatures = "dialogLeft:1024px;dialogTop:768px;dialogHeight:200px;dialogWidth:100px;status:no"; window.showModalDialog("/admin/openWindows/msg_show.aspx", vArguments, sFeatures); //弹窗页面 } else { } } function isHasMsg() { $.post('/admin/ashx/isHasMsg.ashx', { r: Math.random() }, function (data) { if (data == "1") { notifyTeacher(); } }) } window.setInterval("isHasMsg()", 10000);
弹窗页面中点击打开的页面js代码
<script type="text/javascript"> $(document).ready(function () { window.focus(); }) </script>