当我使用window.open()方法打开子页面时。在完全加载子页面之前,当我关闭它时,它将刷新"ie-11“中的父页面。我想停止刷新父页面。提前谢谢。
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<button onclick="openWindow()">
OpenWindow
</button>
<script>
function openWindow(){
window.open(url, "_blank","height=200,width=200,status=1,toolbar=1,location=no,scrollbars=yes");
}
</script>
</body>
</html>发布于 2017-07-11 11:12:24
试试这个:
function openWindow(e){e.preventDefault();window.open(url,"_blank","height=200,width=200,status=1,toolbar=1,location=no,scrollbars=yes");
}
https://stackoverflow.com/questions/45024732
复制相似问题