Graham wrote:
I'm not very experienced with Javascript, and I'm trying to determin a
current web page's path. If I use document.location,
.... which is deprecated long since, ...
it returns
http://domain.com/path/to/file
I only want to see /path/to/file
How do I do this?
window.location.pathname
Be aware that this is no longer part of the JavaScript language since
version 1.4 (and has never been in JScript) but instead part of the DOM
of the UA. An UA may or may not implement it, so you should test for it.
And of course enabled client-side script support is required for it.
PointedEars