How to get the current full URL in JavaScript

1 Answer

0 votes
var sl = self.location;
document.write(sl);

/*
run: 

http://localhost/allonpage.com/search.php

*/

 



answered Jun 21, 2018 by avibootz

Related questions

1 answer 262 views
2 answers 313 views
313 views asked Jun 14, 2018 by avibootz
1 answer 192 views
1 answer 121 views
1 answer 173 views
1 answer 159 views
...