浏览器路径 隐藏

 

浏览器地址栏有时会 不想让看到当前文件的名称,所以一般会在页面中转一下

以下是简单示例(只是想到简单实现,可能还会有更好的方法)

index.html

<body>
	<script type="text/javascript">
		window.location="login.html";
	</script>
</body>

login.html

<frameset rows="*,1px" framespacing="0" border="no" style="width:100%; height:100%; margin-top:0px; overflow:auto;">
	<frame id="test" src="#" noresize frameborder="0" />
</frameset>
<body>
</body>
<script type="text/javascript">
	$(document).ready(function() {
	    window.parent.document.getElementById("test").src='content.html' ;
	});
</script>

content.html 为具体的 页面内容

用浏览器打开index页面,浏览器显示内容为 content.html 内容,地址栏路径为:http://127.0.0.1:8020/login.html

亲测!

无聊时的想法,写出来测试的,具体功能的实用性未知 = =

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值