在页面内打开网页 [英] Opening web page within a page

查看:115
本文介绍了在页面内打开网页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望用户只能看到一个网址.
例如,如果他们单击任何菜单选项.
网址应该在地址栏中保持不变.
您如何做到这一点,并且因为我们在Visual Studio中没有框架集,所以我们在主索引页面上设置了框架集.

<frameset>
<frame src="MainPage.html">
</frameset>



无论您导航到何处,地址都将保持不变.


请参阅此处 [ ^ ]了解更多信息.


或者将Ajax与通过HTML POST发送的信息一起使用,因此Javascript部分会呈现屏幕,但URL从未更改.


I want user to see only one url.
like for example, if they click on any menu options.
url should stay same in addressbar.
how do you do that and as we don''t have frameset in visual studio

解决方案

Make the main index page a frameset.

<frameset>
<frame src="MainPage.html">
</frameset>



No matter where you navigate to, the address remains the same.


see here[^] for more info.


Alternatively use Ajax with the info sent via HTML POST, so the Javascript part renders the screen but the URL never changes.


这篇关于在页面内打开网页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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