Possible Duplicate:
Request Address in Javascript
Is there any method to retrieve the URL of the current page in JavaScript or jquery?
Please help.
Possible Duplicate:
Request Address in Javascript
Is there any method to retrieve the URL of the current page in JavaScript or jquery?
Please help.
Here is how you would do it in jQuery :P
(function($) {
$.getUrl = function() {
return window.location.href;
}
})(jQuery);
Warning: Obviously the jQuery function is for LOLs. Don't really use it.