开发者

How to remove #name from URL?

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜