aspxtreme

protocol Property

location Properties   DHTML Objects


Returns the access method of a URL.

Syntax


HTML N/A
Script object.protocol [ = sProtocol ]

Possible Values


sProtocol Specifies the protocol used to transfer information.

The property is read/write with no default value.

Remarks

The protocol property specifies how information is transferred from the host to the client. Microsoft® Internet Explorer® supports several predefined protocols, including http and ftp.

The protocol property returns the initial substring of a URL, including the first colon ( for example: http: ). However, the document and location objects expose the protocol property as read-only and the property returns the expanded text of the protocol acronym. For example, the http protocol is returned as Hypertext Transfer Protocol.

Example

The following example displays the document protocol property in a message box.

alert ( document.protocol ) 

 Show me 

Applies To

A, AREA, document, IMG, location



Books and more ...

Contents
HTML Elements / DOM Objects
HTML Element Attributes
CSS Attributes
DOM Object Properties
DOM-compliant Events Reference
DOM Methods Reference
DOM Collections Reference
 


Suggested Reading



Previous page Back to top Next page

Check out related books at Amazon

© 2000-2008 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support aspxtreme