您的位置:首页 > Web前端 > JavaScript

JS跳转页面后地址栏隐藏IP和端口号

2017-12-20 12:46 246 查看
1、浏览首页:

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
</head>
<body>
<div> </div>
</body>

</html>
<script src="jquery-1.8.3.min.js"></script>
<script>
$(function () {
window.location.href = "HtmlPage2.html";
})
</script>


2、iframe页面链接地址
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
</head>
<body>
<div style="width:100%; height:100%">
<iframe id="Iframe1" frameborder="0" scrolling="no" src="http://47.95.9.198:99/phpGujia/index.php" mce_src="http://91gujia.com/"></iframe>
</div>
</body>
</html>
<script src="jquery-1.8.3.min.js"></script>
<script>
$(function () {
//var height = $(window).height();
//var width = $(window).width();
var height = document.documentElement.clientHeight;
var width = document.documentElement.clientWidth;
$('#Iframe1').attr('height', height);
$('#Iframe1').attr('width', width);

$(window).resize(function () {
var height = document.documentElement.clientHeight;
var width = document.documentElement.clientWidth;
$('#Iframe1').attr('height', height);
$('#Iframe1').attr('width', width);
});
});
</script>浏览器访问的时候隐藏了下面这地址:
47.95.9.198:99/phpGujia/index.php
显示的是首页地址;
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: