首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > Web前端 >

window.showModalDialogSelect标签返回值有关问题

2012-10-30 
window.showModalDialogSelect标签返回值问题父页面:$(#showmodaldialog).click(function() {var result

window.showModalDialogSelect标签返回值问题
父页面:
     $("#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(); //关闭本窗体
      });

热点排行