Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to get the url of a page in javascript

// this gives you just the URL without params
var currentUrlWithoutParams = window.location.href.split("?")[0];
 
PREVIOUS NEXT
Tagged: #url #page #javascript
ADD COMMENT
Topic
Name
3+5 =