All Javascript Commands for URL's [closed]
So I want a list of all javascript commands what can manipulate or get information about URL's.
Example:
window.location.href
To list the properties of an object you can use this method:
var p = [];
for (var i in window.location)
{
p.push(i);
}
alert(p.join("\n"));
For window.location
I get:
- href
- protocol
- search
- hash
- pathname
- hostname
- host
- port
- reload
- replace
- assign
W3C
W3 Schools
Mozilla
Your question is not really clear. However, I suggest that you have a look one the Javascript reference from Mozilla. The response to your question is here, no doubt about that!
https://developer.mozilla.org/en/DOM/window.location
精彩评论