I should print the URL in an under construction page.
But if I get the url w/
var url = window.location;
document.write(" <p>"+url+"</p>");
I get something like “http://mypage.ass/trololo/pageasd/…/index.html”
But I need simply “mypage.ass”, nothing else.
I tried to clean it with substring but every browser said that it is not a function. -.-
You just need split the url:
BTW:User document.URL can avoid confusion when your service redirect