MELTEAMPOT
Development, Software, Hardware, System, Network, API, WebService, Programmation and co..
Monday, November 10, 2014
Way to get url, protocol in javascript
First get the current address
var url = window.location.href
Then just parse that string
var arr = url.split("/");
your url is:
var result = arr[0] + "//" + arr[2]
http://stackoverflow.com/questions/948973/getting-relative-image-src-with-jquery
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment