How to get rid of hash in URL when redirecting?
I have a page with two forms on it. Both are submitted to the original url of the page (action=""), the second one adds a hash segment to it (action="#second-form"). When the second form is valid I want to redirect to another page for a second step, but without #sec开发者_JS百科ond-form in the url.
Is this possible? It seems like no matter where I redirect the user to #second-form is always retained in the url (e.g. http://www.google.com/#second-form).
Maybe if you try to put this on your code it works..
<base href="http://www.theurlyouwant.com/"/>
Point your action to your filename of the page, instead of "".
E.g. (just a bunch of the same examples for different file names) action="index.html" action="index.asp" action="index.php" action="form.asp" action="form.php"
精彩评论