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 372 views
2 answers 416 views
416 views asked Jun 14, 2018 by avibootz
1 answer 288 views
1 answer 221 views
1 answer 271 views
1 answer 250 views
...