0
我打開彈出窗口someurl.aspx。處理後重定向到父網址。但如果窗口找到父網址,我需要關閉它。如何在javascript中關閉基於url的彈出窗口
function openNewWin(url) {
window.location = '../../Portal/Billing/BillGeneration.aspx';
var newwindow = window.open(url, 'popuprpt', 'width=940,height=700,scrollbars=yes,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=10,top=5');
var isPopup = (window.location.href == window.opener.location.href);
if (isPopup == true) {
newwindow.close();
}
return false;
}
但它沒有工作。如何實現它