Anchor.protocol (Property)

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

Availability:

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

This yields the protocol value of the HREF attribute in an <A> tag.

Using this property as an LValue, you can redefine the protocol for the link if it has an HREF. You might want to do this if you want to change the way you access a particular document.

The URL topic enumerates a large number of available protocols that can be used in SRC and HREF HTML tag attributes.

Warnings:

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