`
jack1210
  • 浏览: 22003 次
  • 性别: Icon_minigender_1
  • 来自: 上海
最近访客 更多访客>>
社区版块
存档分类
最新评论

window.showModalDialogSelect标签返回值问题

JSP 
阅读更多
父页面:
     $("#showmodaldialog").click(function() {
var result = window.showModalDialog("<%=request.getContextPath()%>/gcbase/components/certification/showmodal.jsp?type=1","aa","dialogWidth=400px;dialogHeight=100px");
var splitRs = result.split("|");
var oilType = document.getElementById("oilType");
for(var i01=0;i01<oilType.length;i01++) {
if(oilType.options[i01].innerText == splitRs[1]) {
oilType.options[i01].selected = true;
}
}
});

子页面:
       $("#ok").click(function() {
var selectVal = "";
var innerText = "";
var selectUnit = document.getElementById("orgunit");
for(var i01=0;i01<selectUnit.length;i01++) {
if(selectUnit[i01].selected == true) {
   innerText = document.getElementById("orgunit").options[i01].innerText;
   selectVal = selectUnit[i01].value;
}
}
parent.returnValue = selectVal + "|" + innerText;//返回值
window.close(); //关闭本窗体
      });
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics