jQuery: strip domain name from url (string)
Posted
by Fuxi
on Stack Overflow
See other posts from Stack Overflow
or by Fuxi
Published on 2010-04-08T01:45:07Z
Indexed on
2010/04/08
1:53 UTC
Read the original article
Hit count: 305
hi all,
i'm accessing the stylesheet collection like this:
var css = document.styleSheets[0];
it returns eg. http://www.mydomain.com/css/main.css
question: how can i strip the domain name to just get /css/main.css
?
thx
© Stack Overflow or respective owner