I want to get the url with javascript. But I just need http://www.mysite.com, without any parameters behind it. any idea how to get that?
Use this:
var url = window.location.protocol + "//" + window.location.host;
window.location.hostname
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With