Or, "Where Am I and How Did I Get Here?" or, "Where Do I Go Now?"
will set str as follows:
But if you are viewing a file on your own system, it will take the general form of:
Note that the local path begins with file: and is followed by three slashes, while the internet paths are followed by just two slashes.
Built-in Calls that Parse the .href
Using these location calls, this location.href is parsed into its various components automatically as shown just below:
This little script incorporates the various location calls so that you can see them in action:
|Links: Introduction | Chapter One | Chapter Two | Chapter Three | Chapter Four | Chapter Five | Chapter Six | Chapter Seven | Chapter Eight | Chapter Nine | Chapter Ten | Chapter Eleven | Chapter Twelve | Chapter Thirteen | Chapter Fifteen | Chapter Sixteen | Chapter Seventeen | Chapter Eighteen | Chapter Nineteen | Chapter Twenty | Chapter Twenty-one | Chapter Twenty-two | Chapter Twenty-three | Appendix A | Appendix B | Appendix C | Appendix D | Cover|
This free virtual book provided courtesy of:
AutoScripter(tm), the site for professional Web Designers and Developers and
WebWalker Virtual Press, virtual publishing on the Web since 1994
Other free e-books from WebWalker: The All American Terrorists | The Gnomes of Jost | For the Love of Entropy | The Trees of Kratva | The Arch of Rain Magicians | Lightshow | The Black Mancutters Guild | The Septoracle
© Copyright 1997, 1999, 2000, 2001 John H. Keyes