[英]Window.open opening a tab instead of window in firefox and safari
我有一個簡單的HTML布局:
<html>
<head>
<script>
function test() {
window.open('http://google.com','','menubar=no,toolbar=no,status=no,scrollbars=yes,resizable=no,width=545,height=353');
}
</script>
</head>
<body>
<button onclick="test();">Test</button>
</body>
</html>
單擊該按鈕應該會打開一個具有我指定規格的新窗口。 但是,它會在firefox和safari中打開一個新標簽。 它在chrome中效果很好。 尚未測試其他瀏覽器。 上面的代碼有什么問題嗎?
想通了。 這是因為我在全屏模式下使用Firefox和Safari,因此打開新窗口會打開一個新標簽,而不是退出全屏模式:)
謝謝
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.