通过showModalDialog打开一个窗口,在当前窗口中不能进行鼠标“右击”操作,并且传递参数(字符串、数组)可以不用在url进行拼接传递,关于showModalDialog的说明网上有很多说明,这里就不做具体说明,请看下面实例:
1、在role-binding-add.jsp中的js方法中有如下代码:
var allInfo=new Array(2);
allInfo[0] = document.forms[0].userIds.value;
allInfo[1] = document.forms[0].peopleSearchCondition.value;
//可以传递数组
var result = showModalDialog
("${pageContext.request.contextPath}/cbice/subsystem/unifiedroleadmin/select-no-center-people.jsp?selectType=muti",allInfo, "dialogWidth=800px;dialogHeight=500px;dialogLeft=200px;dialogTop=100px;status=no;");
//返回值可以是数组
if(result){
formObj.userIds.value=result[0];
document.forms[0].peopleSearchCondition.value=result[1];
}
2、select-no-center-people.jsp中的js方法有如下代码:
//当前方法是处理用户点击提交后,将信息保存到上一页面。
var selectOKArr = new Array(2);
window.returnValue=selectOKArr;
self.close();
3、附件是一个js写的对两个select中的内容进行添加、删除操作。
分享到:
相关推荐
div层实现showModalDialog
showModalDialog参数传递和获
showModalDialog和showModelessDialog使用心得
This is a `window.showModalDialog()` shim using a modal HTML5 `<dialog>` element and ECMAScript 6 Generators. It was tested in the latest Google Chrome with the *Enable Experimental JavaScript* flag ...
showModalDialog参数详解 基本介绍: showModalDialog() (IE 4+ 支持) showModelessDialog() (IE 5+ 支持) window.showModalDialog()方法用来创建一个显示HTML内容的模态对话框。 window.showModelessDialog()...
解决三层或心上showModalDialog的问题_2
showModalDialog刷新窗口的例子
Selenium目前没有提供对IE模态对话框(即通过showModalDialog方法打开的弹出对话框)的处理。原因在于,模态对话框会将父页面的 JS挂起,直至对话框处理完毕才会继续执行父页面JS。因为Selenium的底层实现是基于JS的,...
主要介绍showModalDialog的用法和参数的传递
DIV 实现showModalDialog效果,内加树形效果
NULL 博文链接:https://shoushounihao.iteye.com/blog/1954623
window.showModalDialog的基本用法
javascript代码模块之\Window.ShowModalDialog使用手册
ShowModalDialog函数的功能: 使用方法: 参数说明:
网上自己找了很久,也没找到有用的方法。自己苦弄一天,终于解决。
NULL 博文链接:https://qsfwy.iteye.com/blog/587749
解决谷歌浏览器37+版本window.showModalDialog方法失效问题,最终版本。 10分你值得拥有
window.showModalDialog&&open.docx
网上找了好几个小时没有找到解决办法。最终还是自己解决了。...这样做就是用超链接把返回url转递到用showModalDialog打开的新窗口中,当showModalDialog返回时指到转来的url,最终不刷新父窗口。......