iframe子页面传递数据到父页面,window.parent.postMessage({msg:window.saveSignUrl})
EZCAAjaxIO(json, function (datas) {
var json_obj = processingreturns(datas);
if (json_obj == null) {
return;
}
sys_mask.style.display = "none";
console.log('临时路径',serviceurl + "DownLoad?time=" + new Date().getTime())
window.saveSignUrl = serviceurl + "DownLoad?time=" + new Date().getTime()
// iframe传递
window.parent.postMessage({msg:window.saveSignUrl})
// iframe传递
// document.getElementById("iframe_save_file").src = serviceurl + "DownLoad?time=" + new Date().getTime();
});
父页面这样去接收window.addEventListener('message',this.handleSign)
image.png
网友评论