createPopup 弹出窗口如何定位到屏幕右下角?(急)
实现功能:用createPopup创建弹出窗口,并把创建的弹出窗口在屏幕的右下方显示.
问题:
当通过本地做的HTML测试的时候,可以实现上面的功能.但是把期布置在WEB服务器上的时候,发现期弹出窗口跟着浏览器显示,不能在屏幕的右下方显示.也把WEB站点设置为了可信站点,但是也没能实现.求解决办法?
补充问题:
运行环境:IE8.0,WEB服务器为TOMCAT5.0,操作系统为XP系统.
事例代码如下:
<html>
<head>
</head>
<SCRIPT language="javascript" >
function popmsg(qr_whdanmsg,whdanmsg,mimamsg){
var oPopup = window.createPopup();
var popTop=50;
var winstr=" <table style=\"border: 1 solid #FFA6CA\" width=\"241\" height=\"172\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">";
winstr+=" <tr>";
winstr+=" <td height=\"25\"> </td>";
winstr+=" </tr>";
winstr+=" <tr>";
winstr+=" <td height=\"25\" align=\"center\" valign=\"top\" style=\"font-size:12px; color: red; face: Tahoma ;\" >"+whdanmsg+" </td>";
winstr+=" </tr>";
winstr+=" <tr>";
winstr+=" <td height=\"25\" align=\"center\" valign=\"top\" style=\"font-size:12px; color: red; face: Tahoma ;\" >"+qr_whdanmsg+" </td>";
winstr+=" </tr>";
winstr+=" <tr>";
winstr+=" <td height=\"25\" align=\"center\" valign=\"top\" style=\"font-size:12px; color: red; face: Tahoma;\" >"+mimamsg+" </td>";
winstr+=" </tr>";
winstr+=" <tr>";
winstr+=" <td> </td>";
winstr+=" </tr>";
winstr+=" </table>";
oPopup.document.body.innerHTML = winstr;
popshow(oPopup,popTop);
}
var _st = window.setTimeout;
window.setTimeout = function(fRef, mDelay) {
if(typeof fRef == 'function'){
var argu = Array.prototype.slice.call(arguments,2);
var f = (function(){ fRef.apply(null, argu); });
return _st(f, mDelay);
}
return _st(fRef,mDelay);
}
function popshow(oPopup,popTop){
window.status=popTop;
if(popTop>1720){
popTop=50;
}else if(popTop>1520&&popTop <1720){
oPopup.show(screen.width-250,screen.height,241,1720-popTop);
}else if(popTop>1500&&popTop <1520){
oPopup.show(screen.width-250,screen.height+(popTop-1720),241,172);
}else if(popTop <180){
oPopup.show(screen.width-250,screen.height,241,popTop);
}else if(popTop <220){
oPopup.show(screen.width-250,screen.height-popTop,241,180);
}
popTop+=10;
var mytime=setTimeout(popshow,50,oPopup,popTop);
}
window.setInterval(popmsg("a","b","c"),5000);
</SCRIPT>
<body>
</body>
</html>
HTML 浏览器 --------------------编程问答-------------------- 没人知道吗?
补充:Java , Web 开发