简体   繁体   English

打开没有标签部分的新弹出式chrome窗口

[英]Open new popup chrome window without tab section

Sometimes surfing the web with chrome,I encounter a website or web app,when click on an <a> or <button> element it opens a new popup browser window which does not have tab section while I do not have any Chrome Extension installed: 有时使用chrome浏览网页,我遇到一个网站或网络应用,当点击<a><button>元素时,它会打开一个新的弹出式浏览器窗口,当我没有安装任何Chrome扩展程序时,该窗口没有标签部分:

main window: 主窗口:

在此输入图像描述

popup new window: 弹出新窗口:

在此输入图像描述

My question is,How to do this using JavaScript? 我的问题是,如何使用JavaScript做到这一点?

Thanks. 谢谢。

Please see tutorial here: http://www.w3schools.com/jsref/met_win_open.asp 请参阅此处的教程: http//www.w3schools.com/jsref/met_win_open.asp

<script>
function myFunction() {
    window.open("http://www.w3schools.com","_blank",
    "toolbar,scrollbars,resizable,top=500,left=500,width=400,height=400");
}
</script>
<!DOCTYPE html>
<html>
<body>

<button onclick="openTheWindow()">open window</button>

<script>
function openTheWindow() {
    var myWindow = window.open("", "", "width=800,height=800");
}
</script>

</body>
</html>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM