【发布时间】:2014-09-23 15:35:50
【问题描述】:
我有一个简单的 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 中运行良好。没有测试其他浏览器。上面的代码有问题吗?
【问题讨论】:
标签: javascript html firefox safari