HTML DOM Anchor protocol attribute is used to set or return the protocol linked in the href attribute.
The following is the syntax for setting the protocol attribute -
anchorObj.protocol = protocol_url
Above, protocol_url is the protocol of the URL. Values can be http, https, ftp, etc.
The following is the syntax for returning protocol attributes-
anchorObj.protocol
Now let us look at an example of implementing the DOM Anchor protocol attribute-
Live demonstration
Demo Heading
Link = Services
Click the "Show Protocol" button -
The above is the detailed content of The Chinese translation of HTML DOM Anchor protocol Property is 'HTML DOM anchor protocol property'. For more information, please follow other related articles on the PHP Chinese website!