Anchor.pathname (Property)

In MSIE the Url.pathname property is also available as the Anchor.pathname property.

Availability:

JavaScript - 1.2
JScript - 3.0
Internet Explorer - 4.0
Netscape - 4.0
Property/method value type:String primitive
JavaScript syntax:-myAnchor.pathname
-myAnchor.pathname = newPath
HTML syntax:<A HREF="...">

This yields the pathname portion of the HREF attribute in an <A> tag.

MSIE and Netscape support the use of this property as an LValue. If you write to it, the pathname portion of the HREF value is modified. Be careful not to include a hash or search/query value.

Warnings:

See also:Anchor object, Anchor.hash, Anchor.host, Anchor.hostname, Anchor.href, Anchor.port, Anchor.protocol, Anchor.search, Anchor.target, URL, Url.pathname