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 371 views
2 answers 415 views
415 views asked Jun 14, 2018 by avibootz
1 answer 283 views
1 answer 216 views
1 answer 266 views
1 answer 246 views
...