立即註冊 登錄
痞酷網_PIGOO 返回首頁

fakedeireas的個人空間 https://bbs.pigoo.com/?62921 [收藏] [複製] [RSS]

日誌

IE, Chrome 通用 showModalDialog 語法

已有 4805 次閱讀2014-4-3 05:01 PM |個人分類:系統記事本| showModalDialog, 語法

母視窗
//SetName 接收欄位
var returnValue = window.showModalDialog(CallUrl,false,"dialogWidth:800px;dialogHeight:500px;status:0;");
    
//for IE
if (returnValue != undefined) {
document.all[SetName].value = returnValue;
} else {
//for chrome
if (window.returnValue != undefined) {
document.all[SetName].value = window.returnValue;
}
}

子視窗:
if (window.opener != undefined) {
//for chrome
window.opener.returnValue = returnValue;
} else {
//for IE
window.returnValue = returnValue;
}


路過

雞蛋

鮮花

握手

雷人

全部作者的其他最新日誌

評論 (0 個評論)

facelist

您需要登錄後才可以評論 登錄 | 立即註冊

關閉

站長小叮嚀上一條 /1 下一條

禁閉室|手機版|連繫我們|痞酷網電子技術論壇

GMT+8, 2024-3-29 09:36 AM , Processed in 0.032698 second(s), 21 queries , Gzip On.

Powered by Discuz! X3.4 Licensed

© 2001-2023 Discuz! Team.