隐藏浏览器地址栏

window.open是打开新窗口的命令
其中的参数url是为了传入需要打开的页面;
newwindow可有可无;
height是打开窗口的高度;
width是打开窗口的宽度;
top是窗口距离显示器顶端的像素数;
left是窗口距离显示器左边的像素数;
toolbar设置是否显示工具栏;
menubar设置是否显示菜单栏;
scrollbars设置是否显示滚动条;
resizable设置是否可以调整大小;
location设置是否显示地址栏;
status设置是否显示状态栏;

代码如下,一试便知道,是不是很爽呢?

show.js
function openwin(url) {
window.open (url, "newwindow", "height=9999, width=9999, top=200,left=200 toolbar =no, menubar=no, scrollbars=no, resizable=no, location=no, status=no");
}


index.html
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<script src="show.js" type="text/javascript"></script>
<body onload="openwin('index.jsp')" />
</body>
</html>

你可能感兴趣的:(html,浏览器)