开发者

How to remove #name from URL?

开发者 https://www.devze.com 2023-02-18 07:03 出处:网络
I have a site which has a inner hyperlink http://www.example.com/#name. I want to change it开发者_C百科 to http://www.example.com.If it\'s just in HTML, you need to just simply stop linking to #name a

I have a site which has a inner hyperlink http://www.example.com/#name. I want to change it开发者_C百科 to http://www.example.com.


If it's just in HTML, you need to just simply stop linking to #name and link to the root instead. Go through all your anchor links and remove the reference to #name.

If you have access to dynamic server side languages, you can dynamically filter the content based on a cookie/session/querystring thus removing the need for named anchors.


your question is similar to this stackoverflow.com post: jQuery removing hash value from URL


java: url.substring(0, url.indexOf("#"));

0

精彩评论

暂无评论...
验证码 换一张
取 消