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("#"));
加载中,请稍侯......
精彩评论