Return the protocol of the current URL:
The result of x will be:
The protocol property sets or returns the protocol of the current URL, including the colon (:).
The protocol is a standard that specifies how data are transmitted between computers.
Property | |||||
---|---|---|---|---|---|
protocol | Yes | Yes | Yes | Yes | Yes |
Return the protocol property:
Set the protocol property:
Value | Type | Description |
---|---|---|
protocol | String |
The protocol of the URL. Possible values:
|
Return Value: | A String, representing the protocol of the current URL, including the colon (:) |
---|