showModalDialog使用技巧

1、  文本可选

在span、p、body标签中加入“contentEditable=’true’”或者

Document.all[‘’].contentEditable=true;

ContentEditable是把内容变成设计模式,不仅可以拷贝,还可以修改,默认值为“inherit”

 

2、  弹窗如何调用父窗口的js方法

Parent:window.showModalDialog(url, window, ‘’);

Child: window.dialogAragments.parentFunction

parentFunction为父窗口的js方法

 

3、  关闭弹窗时,不刷新父窗口

子窗口的html中,插入“<base target=’self’/>”

posted @ 2012-09-20 16:58  远方V3  阅读(167)  评论(0编辑  收藏  举报