如何在Chrome中禁用弹出窗口的位置栏和滚动条? [英] How to disable location bar and scroll bars of pop window in Chrome?

查看:568
本文介绍了如何在Chrome中禁用弹出窗口的位置栏和滚动条?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

以下代码宽度和高度在Chrome中可用,但位置和滚动条不起作用。请指导。

For the following code width and height are working in Chrome but location and scrollbar are not working. Please guide.

<script language="JavaScript"> 
  function newwindow() { 
    window.open('http://localhost/a.php', 'jav',
        'width=300,height=200,resizable=yes,location=no,scrollbars=no'); 
  } 
</script>

<a href="javascript:newwindow()">Click Here</a>


推荐答案

Chrome出于安全原因不允许您这样做。隐藏地址栏可以让您更轻松地假装自己是 somebank.com ,当时您确实是 somenigerianguy.com

Chrome will not allow you to do this for security reasons. Hiding the address bar makes it easier to pretend you're somebank.com when really you're somenigerianguy.com.

至于滚动条,你可以在<$ c上使用css $ c> a.php 通过设置 overflow:hidden 隐藏滚动条。

As for the scrollbar, you can use css on a.php to hide the scrollbars by setting overflow: hidden.

这篇关于如何在Chrome中禁用弹出窗口的位置栏和滚动条?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆