JS在Chrome浏览器中showModalDialog函数返回值为undefined的解决方法
本文实例讲述了JS在Chrome浏览器中showModalDialog函数返回值为undefined的解决方法。分享给大家供大家参考,具体如下:
主页面:
<scripttype="text/javascript">
functionSelectGroupCust(){
vartemp=window.showModalDialog("Default2.aspx?xx="+Date(),"","dialogWidth=800px;dialogHeight=600px;help=no;center=yes;");
//forchrome
if(temp==undefined){
temp=window.returnValue;
}
alert(temp);
returntrue;
}
</script>
详细页面:
<scriptlanguage="javascript"type="text/javascript">
functionReturnAddressee(){
if(window.opener!=undefined){
window.opener.returnValue="1";
}
else{
window.returnValue="2";
}
window.close();
}
</script>
更多关于JavaScript相关内容感兴趣的读者可查看本站专题:《JavaScript错误与调试技巧总结》、《JavaScript数学运算用法总结》、《JavaScript中json操作技巧总结》、《JavaScript切换特效与技巧总结》、《JavaScript查找算法技巧总结》、《JavaScript动画特效与技巧汇总》、《JavaScript数据结构与算法技巧总结》及《JavaScript遍历算法与技巧总结》
希望本文所述对大家JavaScript程序设计有所帮助。