================================
©Copyright 蕃薯耀 2020-07-31
https://www.cnblogs.com/fanshuyao/
if(window.location != parent.location){//判斷是否有父窗口,當不相等時,表示有父窗口 console.log("向父頁面發送回調請求:tableName = " + tableName + ",layerName = " + layerName); window.parent.postMessage(returnObject, "*"); }else{ console.error("需要嵌套在iframe頁面中"); }
================================
©Copyright 蕃薯耀 2020-07-31
https://www.cnblogs.com/fanshuyao/