Created
October 14, 2013 22:21
-
-
Save joemcgill/6983229 to your computer and use it in GitHub Desktop.
Nice reference of browswer location attributes cribbed from this Stack Overflow thread:
http://stackoverflow.com/questions/406192/how-to-get-the-current-url-in-javascript
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://www.refulz.com:8082/index.php#tab2?foo=123 | |
Property Result | |
------------------------------------------- | |
host www.refulz.com:8082 | |
hostname www.refulz.com | |
port 8082 | |
protocol http | |
pathname index.php | |
href http://www.refulz.com:8082/index.php#tab2 | |
hash #tab2 | |
search ?foo=123 | |
var x = $(location).attr('<property>'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment