Can we remove the url through js?
-
Can we remove the url through js? For example
http://site.ru/index.php?id=123
How to do that.http://site.ru/index.php
♪ How to get away from it.?
without reloading the page.
-
var s = "http://site.ru/index.php?id=123"; var n = s.indexOf("?"); document.body.innerHTML = n >= 0 ? s.substr(0, n) : s;