b2科目四模拟试题多少题驾考考爆了怎么补救
b2科目四模拟试题多少题 驾考考爆了怎么补救

showModalDialog改进版,包括Chrome下的特殊处理

电脑杂谈  发布时间:2016-05-30 07:03:08  来源:网络整理

你是否正在寻找关于showmodaldialog的内容?让我把最直接的东西奉献给你:

继了解了上篇文章()后对以前showmodaldialog脚本做相关改进。


父页面

if(window.ActiveXObject){ //IE $("#choose_entp").click(function(){ var returnValue = window.showmodaldialog("SelectEntpInfo.do?mod_code=${af.map.mod_code}&xxx=" + Math.random(), window, "dialogWidth:630px;status:no;dialogHeight:440px"); if(returnValue != null ){ setValue(returnValue.id,returnValue.name); } }); }else{ //非IE $("#choose_entp").click(function(){ window.open("SelectEntpInfo.do?mod_code=${af.map.mod_code}&xxx=" + Math.random(), 'newwindow','height=440,width=630,top=150,left=300,toolbar=no,menubar=no,scrollbars=no, resizable=no,location=no, status=no'); }); } function setValue(id,name){ $("#entp_id").val(id); $("#entp_name").val(name); }

子页面处理:

function getReturnValue(select_id,select_name){ if(window.ActiveXObject){ //IE window.returnValue = { id : select_id, name : select_name } ; window.close(); }else{ //非IE if(window.opener) { window.opener.setValue(select_id,select_name) ; } window.close(); } }
试了下,貌以前翻页父窗口引用的问题也解决了,。比之前()用的方法要方便些。

以上就是关于showmodaldialog的全部内容,相信你一定会非常满意。


本文来自电脑杂谈,转载请注明本文网址:
http://www.pc-fly.com/a/jisuanjixue/article-6855-1.html

    相关阅读
      发表评论  请自觉遵守互联网相关的政策法规,严禁发布、暴力、反动的言论

      热点图片
      拼命载入中...