If I use:

alert(window.location.href);

I get everything including query strings. Is there a way to just get the main url part, for example:

http://mysite.com/somedir/somefile/

instead of

http://mysite.com/somedir/somefile/?foo=bar&loo=goo

10 Answers
10

Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *