我已经定义了showInfo,可是FIREBUG怎么提示我没有提示啊。
<html><head>
<mete http-equiv="content-type" content="text/html;charset=GB2312" />
<title>8-8 动态窗口提示 </title>
<!--样式表 -->
<style>
*{font-size:12px;font-family:宋体,Arial;font-weight:normal;color:#333; } /*规定了所有的字体样式*/
</style>
<script>
var oPopup;
var winWidth = 220, winHeight = 140;
var popup_dir;
function initPopup(){
oPopup = window.open("","_popup","scrollbars=no,status=no,toolbar=no,menubar=no,resizable=no,titlebar=no,location=no");
var oBody = oPopup.document.body;
oBody.style.backgroundColor = "lightyellow";
oBody.style.borderStyle = "none";
}
function showInfo(str){
initPopup();
oPopup.document.body.innerHTML = str;
popup_dir = -1;
showPopup(winHeight-100);
}
function showPopup(y){
oPopup.resizeTo(winWidth, winHeight - y);
oPopup.moveTo(screen.availWidth - winWidth, screen.availHeight - winHeight + y);
y+=popup_dir;
if( y > winHeight-100 && popup_dir>0){
oPopup.close();
return;
}else if( y<0 && popup_dir<0){
popup_dir = 2;
setTimeout("showPopup(0);",2000");
return;
}else{
setTimeout("showPopup(" + y + ");", 2);
}
}
</script>
</head>
<body style="overflow:auto;">
<input type="button" value="测试提示效果" onclick="showInfo('这里是提示信息');">
</body>
</html>