Get Current URL in Javascript
JS (JQuery):
$(document).ready(function() { $(location).attr('href'); });
JS (standard):
function CurrentURL() { var currenturl = window.location.pathname; return currenturl; }
Posted on January 10, 2011, in Programming & Development and tagged .net, asp, asp.net, aspx, base, base url, basename, c#, current address, current url, dev, develop, developer, developing, javascript, jq, jquery, js, microsoft, ms, path, pathname, programming, root, root url, site url, uri, url, vb. Bookmark the permalink. Leave a comment.
Leave a comment
Comments 0