window.showModalDialog的传值和返回值
2013-12-13 15:55
435 查看
window.showModalDialog(URL,dialogArgments,features) 打开一个新窗口
URL为要将打开的网页地址。
dialogArgments为设定好传递给新视窗网页的参数,可以为任意数据类型。
features:
certer , dialogHeight, dialogLeft,dialogTop,dialogWidth,help(是否显示help按钮,下同),status,resizeable
值=1为yes,0为no.
dialogArgments,可以传递值到新的窗口。
window.returnValue.可以在showModalDialog开启的窗口关闭后前,回传一个任意类型的值。
1.html
function aa(){
var result = window.showModalDialog("2.html", window, "scroll:1;scrollbar:1;dialogWidth:600px;dialogHeight:550px;help:no;status:no;");
alert(result);
}
2.html
function getCurrentSelect(){
window.returnValue = document.getElementById("queryName").value;
window.close();
}
URL为要将打开的网页地址。
dialogArgments为设定好传递给新视窗网页的参数,可以为任意数据类型。
features:
certer , dialogHeight, dialogLeft,dialogTop,dialogWidth,help(是否显示help按钮,下同),status,resizeable
值=1为yes,0为no.
dialogArgments,可以传递值到新的窗口。
window.returnValue.可以在showModalDialog开启的窗口关闭后前,回传一个任意类型的值。
1.html
function aa(){
var result = window.showModalDialog("2.html", window, "scroll:1;scrollbar:1;dialogWidth:600px;dialogHeight:550px;help:no;status:no;");
alert(result);
}
2.html
function getCurrentSelect(){
window.returnValue = document.getElementById("queryName").value;
window.close();
}
相关文章推荐
- centos 6.2 安装mplayer
- 双机热备
- 【翻译】使用新的Sencha Cmd 4命令app watch
- w_chart*(LPTSTR)和char*相互转换
- Java迭代器模式(Iterator)
- Oracle物化视图2 -- Query Rewrite及参数
- [codility]equi
- Perl语言入门(第五版) 读书笔记(二)---输入与输出、文件读写
- 【翻译】使用新的Sencha Cmd 4命令app watch
- 【翻译】使用新的Sencha Cmd 4命令app watch
- 通过注册表控制软件可否运行
- B2B策划书:B2B行业网站未来5年发展趋势预测
- How to scan images, lookup tables and time measurement with OpenCV
- 多线程
- Genesis-3D学习手册——6.游戏对象
- HDU 1004
- Cocos2d-x使用android拍照功能加载照片内存过大,通过另存照片尺寸大小解决
- Hard 随机选择subset @CareerCup
- enter键触发事件
- linux相关书籍