如何在IE7下弹出模式窗口?
解决方案 »
- 未将对象引用设置到对象的实例。
- 在asp.net 使用数据绑定控件如何防止生成多余的编码??
- 獲取遠端電腦的配置信息
- 100 分!! 用 window.open 方法打开一个子页,这子页如何能把父页面的值取过来?
- 请问为什么我在xp下做的asp.net网站程序在win2003下不能打开访问?
- 哪位老大能够在webgrid中添加自定义的摸板列阿?
- treeview问题
- 求一个asp.net的在线编辑器!
- asp.net+vb啊?????????
- 请问怎么在cs文件中动态设置datagrid的Header标题文本为居中模式??
- panel中放GridView,点击如何保持不动的问题
- 求Reapter分页的例子!!!!!
http://msdn2.microsoft.com/en-us/library/ms536392.aspx
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>show</title>
<style type="text/css">
#show{
display:none;
margin:0px auto;
background-color:#999999;
}
#txt{
width:760px;
height:30px;
margin:0px auto;
background-color:#efefef;
}
</style>
</head>
<body>
<div id=show>
</div>
<div id=txt>
<a href="#" onClick="show()">Open</a> <a href="#" onClick="show2()">Close</a>
</div>
<script type="text/javascript">
function show(){
if (!document.getElementById) return false;
if (!document.getElementById("show")) return false;
var show = document.getElementById("show");
show.style.width = "0px";
show.style.height = "0px";
show.style.display = "block";
movement = setTimeout("animation()",0)
}
function animation(){
if (!document.getElementById) return false;
if (!document.getElementById("show")) return false;
var show = document.getElementById("show");
var xpos = parseInt(show.style.width);
var ypos = parseInt(show.style.height);
if (xpos == 760 && ypos == 420){
return true;
}
if (xpos < 760){
xpos+=10
}
if (xpos > 760){
xpos-=10
}
if (ypos < 420){
ypos+=10
}
if (ypos > 420){
ypos-=10
}
show.style.width = xpos + "px";
show.style.height = ypos + "px";
movement = setTimeout("animation()",0);
}
function show2(){
if (!document.getElementById) return false;
if (!document.getElementById("show")) return false;
var show = document.getElementById("show");
show.style.width = "760px";
show.style.height = "420px";
show.style.display = "block";
movement = setTimeout("animation2()",0)
}
function animation2(){
if (!document.getElementById) return false;
if (!document.getElementById("show")) return false;
var show = document.getElementById("show");
var xpos = parseInt(show.style.width);
var ypos = parseInt(show.style.height);
if (xpos == 0 && ypos == 0){
return true;
}
if (xpos < 0){
xpos+=10
}
if (xpos > 0){
xpos-=10
}
if (ypos < 0){
ypos+=10
}
if (ypos > 0){
ypos-=10
}
show.style.width = xpos + "px";
show.style.height = ypos + "px";
movement = setTimeout("animation2()",0);
}
</script>
</body>
</html>
状态栏 工具栏参数可以设置啊
IE7弹出模式窗口和IE6完全相同,一点区别也没有. IE7并不会屏蔽模式窗口(压根屏蔽不了,除非禁用脚本)
除非你说的并不是模式窗口,而是普通的弹出窗口.
在IE7下window.open就不能弹出窗口了
<html>
<head>
<script type="text/javascript">
var wHeight = 768;
var wWidth = 1024;
var x = (window.screen.availWidth-wWidth)/2;
var y = (window.screen.availHeight-wHeight)/2;
parent.window.opener=null;
parent.window.open("","_self");
parent.window.close();function openWindow(){
window.open("fbrole/main/loginframe/login.jsp","","top="+y+",left="+x+",height="+wHeight+",width="+wWidth+",toolbar=no,menubar=no,scrollbars=no,resizable=yes,location=no,status=no");}
</script>
</head>
<body onunload="openWindow();">
</body>
<html>
ie7需要设置一下弹出方式,是新选项卡弹出还是新的页面弹出
但是地址栏没有办法屏蔽掉【除非修改注册表】