完全可以用window.open()代替window.showModalDialog()的方法
来源:互联网 发布:政府办公软件系统 编辑:程序博客网 时间:2024/04/24 20:13
【转】http://www.javaeye.com/topic/123995
有两个页面,一个是调用页面---main.html,一个是被调用页面---modalWindow.html
main.html
--------------------------------------------------------------------------------------------------------------------------------------------
click here
window.onfocus=function (){ if(newWin){ window.document.onfocus=function (){ window.document.onclick=function (){ window.document.ondblclick=function (){ </script> ---------------------------------------------------------------------------------------------------------------------------------- modalWindow.html ------------------------------------------------------------------------------------------------------------------------------------ sub window!!!! 在这个页面modalWindow.html中的方法可以调用父窗口的方法 其用法是 opener.functionName(param); open() 不可能代替 showModalDialog()
<script>
newWin=null;
function abc()
{
newWin =window.open('modalWindow.html','newWin','height=200,width=400,top=200,left=200,toolbar=no,menubar=no,scrollbars=no, resizable=no,location=no,status=no');
}
if(!newWin.closed)
newWin.focus();
}
};
if(newWin){
if(!newWin.closed)
newWin.focus();
}
};
if(newWin){
if(!newWin.closed)
newWin.focus();
}
};
if(newWin){
if(!newWin.closed)
newWin.focus();
}
};
这样做是钻死胡同牛角尖.
唯一方法:可以通过iframe或DIV在同一个Window实现
http://www.laputac.com/tech/
- 完全可以用window.open()代替window.showModalDialog()的方法
- window.open()代替window.showModalDialog()的方法
- window.open代替window.showModalDialog(非标准的BOM方法)
- 真正的用window.open()代替window.showModalDialog()
- 真正的用window.open()代替window.showModalDialog()
- window.open()代替window.showModalDialog()
- 用window.open代替window.showModalDialog和window.showModelessDialog
- window.showModalDialog(),与window.open()刷新上一个窗口的方法
- window.showModalDialog以及window.open的区别
- window.open、window.showModalDialog和window.showModelessDialog 的区别
- window.open、window.showModalDialog和window.showModelessDialog 的区别
- window.open、window.showModalDialog和window.showModelessDialog 的区别
- window.open,window.showModalDialog用法
- window.showModalDialog() and window.open()
- window.open()变成window.showmodaldialog()
- window.open与window.showModalDialog
- window.showModalDialog Vs window.open
- window.open与showModalDialog
- .NET : VS 2005中如何调试javascript
- 2010.01.16 发现了某个网站
- Linux启动过程详解1>
- Windows Server 2003 下硬盘故障解决实录【转】
- javascipt问题:关闭模态对话框,启动新的窗口
- 完全可以用window.open()代替window.showModalDialog()的方法
- 远程连接MySQL速度慢的解决方法以及MySQL解析DNS的流程图
- 外观模式--我无法领悟的简单
- 如何在C语言中巧用正则表达式
- 变声技术
- Android程序Debug
- 用div模拟alert对话框,N秒不点击自动关闭(适用IE6、IE7、firefox)
- Oracle中spool命令实现的两种方法比较
- 橙子音频转换软件Orange Audio Converter