1.父頁面window.open()打開新頁面var targetWeb=null;if(targetWeb){
targetWeb.focus();
}else{
targetWeb=window.open('https://segmentfault.com','segmentfault');
}2.子頁面中關閉父頁面window.opener.close();發現子頁面無法關閉父頁面,會提示:Scripts may close only the windows that were opened by it但若換成:window.opener.location.href='https://www.hao123.com' 卻可以,請問是什么原因
window.opener.close()無效
婷婷同學_
2018-11-13 13:21:38