关于IE模态弹窗的兼容性问题(以及…
2017-10-13 16:34
495 查看
这兼容IE,360,火狐,google等游览器哦 弹出页面是这样写:function selectClassify(id) { var iTop = (window.screen.availHeight-30-570)/2; //获得窗口的垂直位置; var iLeft = (window.screen.availWidth-10-700)/2; //获得窗口的水平位置; try{//IE var returnValue = window.showModalDialog(window.ctx + "/enterpriseClassify/getAll?id="+id,window,"status:no;scroll:yes;center:yes;dialogHeight:570px;dialogWidth:700px;help:no"); if(returnValue != null ){ setValue(returnValue.name); } }catch(e){ //非IE window.open(window.ctx + "/enterpriseClassify/getAll?id="+id, 'newwindow','height=570,width=700,top='+iTop+',left='+iLeft+',toolbar=no,menubar=no,scrollbars=no, resizable=no,location=no, status=no'); } };//setValue是自己定义的赋值方法哦! function setValue(name){ $("#classifyName").val(name); };处理结果的页面我是这样写:function getReturnValue(name){ try{ window.opener.setValue(name) ; }catch( e ){//IE window.returnValue = { name: name } ; } window.close() ;}================================================================================
父窗体部分js代码: returnValue = window.showModalDialog("son.html ", window); //for chrome if (returnValue == undefined) { returnValue = window.returnValue; }
相关文章推荐
- 关于IE6和IE7以及多个版本IE共存的问题
- 火狐、谷歌、IE关于document.body.scrollTop和document.documentElement.scrollTop 以及值为0的问题 博客分类: IE火狐、谷歌javascript
- 火狐、谷歌、IE关于document.body.scrollTop和document.documentElement.scrollTop 以及值为0的问题
- 火狐、谷歌、IE关于document.body.scrollTop和document.documentElement.scrollTop 以及值为0的问题
- 火狐、谷歌、IE关于document.body.scrollTop和document.documentElement.scrollTop 以及值为0的问题
- javascript关于event的ie ff兼容性问题
- javascript和css在ie和firefox中关于兼容性问题的解决办法
- 火狐、谷歌、IE关于document.body.scrollTop和document.documentElement.scrollTop 以及值为0的问题
- 关于oracleERP与IE8、IE9以及WIN7的兼容性及登陆后很慢的问题
- 关于原生事件绑定中attachEvent与addEventlistener中兼容性以及attachEvent函数中this指代window问题
- 关于echarts 跟ie的兼容性问题
- 火狐、谷歌、IE关于document.body.scrollTop和document.documentElement.scrollTop 以及值为0的问题
- 关于input首行缩进IE兼容性问题
- 关于火狐和IE下href="javascript:void(0)"兼容性的问题
- Jsp页面关于BootStrap模态框和<a href onclick>事件不能同时使用,以及传参的问题
- 关于IE,360,火狐,谷歌中遇到的几个兼容性问题的总结
- IE、FireFox、Chrome浏览器中关于URL传参中文乱码,解决兼容性问题!
- 关于J-UI DWZ富框架在IE10下兼容性问题
- 关于IE里模态窗口的一些问题
- 模式浏览器火狐、谷歌、IE关于document.body.scrollTop和document.documentElement.scrollTop 以及值为0的问题