AmitDiwan has Published 11367 Articles

HTML DOM Location hostname Property

AmitDiwan

AmitDiwan

Updated on 30-Jul-2019 22:30:26

263 Views

The Location hostname property returns/sets the hostname for the URL path.SyntaxFollowing is the syntax −Returning value of the hostname propertylocation.hostnameValue of the hostname property setlocation.hostname = hostnameExampleLet us see an example for Location hostname property − Live Demo Location hostname    form {       width:70%;   ... Read More

HTML DOM Location href Property

AmitDiwan

AmitDiwan

Updated on 30-Jul-2019 22:30:26

89 Views

The HTML DOM Location href property returns/sets the string corresponding to the URL path.SyntaxFollowing is the syntax −Returning value of the href propertylocation.hrefValue of the href property setlocation.href = hrefExampleLet us see an example for Location href property − Live Demo Location href    form {     ... Read More

HTML DOM Location origin Property

AmitDiwan

AmitDiwan

Updated on 30-Jul-2019 22:30:26

64 Views

The Location origin property returns the string corresponding to the URL’s protocol, hostname, host port number (if specified).SyntaxFollowing is the syntax −Returning value of the origin propertylocation.originExampleLet us see an example for Location origin property − Live Demo Location origin    form {       width:70%;   ... Read More

HTML DOM Location pathname Property

AmitDiwan

AmitDiwan

Updated on 30-Jul-2019 22:30:26

64 Views

The Location pathname property returns/sets the string corresponding to the URL pathname.SyntaxFollowing is the syntax −Returning value of the pathname propertylocation.pathnameValue of the href property setlocation.pathname = pathOfHostExampleLet us see an example for Location pathname property − Live Demo Location pathname    form {       width:70%;   ... Read More

HTML DOM Location port Property

AmitDiwan

AmitDiwan

Updated on 30-Jul-2019 22:30:26

51 Views

The Location port property returns/sets the port number (if specified) for a URL. Port number might not get displayed if not explicitly specified.SyntaxFollowing is the syntax −Returning value of the port propertylocation.portValue of the port property setlocation.port = portNumberExampleLet us see an example for Location port property − Live Demo ... Read More

HTML DOM Location protocol Property

AmitDiwan

AmitDiwan

Updated on 30-Jul-2019 22:30:26

56 Views

The Location protocol property returns/sets a string corresponding to the protocol used for a URL. Protocol can be set to ‘file:’, ‘http:’, ‘https:’, etc..SyntaxFollowing is the syntax −Returning value of the protocol propertylocation.protocolValue of the protocol property setlocation.protocol = protocolStringExampleLet us see an example for Location protocol property − Live Demo ... Read More

HTML DOM Location reload() method

AmitDiwan

AmitDiwan

Updated on 30-Jul-2019 22:30:26

199 Views

The HTML DOM Location reload() method is used for re – rendering the current document. It provides the same functionality as the reload button in the browser.SyntaxFollowing is the syntax −location.reload(forceGetParameter)ParametersHere, “forceGetParameter” can be the following −forceGetParameterDetailstrueIt defines that current document is reloaded from server.falseIt defines that current document is ... Read More

HTML DOM Location replace() method

AmitDiwan

AmitDiwan

Updated on 30-Jul-2019 22:30:26

150 Views

The HTML DOM Location replace() method is used for rendering a new document replacing the current document. It also removes the current document URL from document history disabling navigation to old document using ‘back’ button.SyntaxFollowing is the syntax −location.replace(URLString)ExampleLet us see an example for Location replace() property − Live Demo ... Read More

HTML DOM Input Email type Property

AmitDiwan

AmitDiwan

Updated on 30-Jul-2019 22:30:26

63 Views

The HTML DOM Input Email type property returns/sets type of Input Email.SyntaxFollowing is the syntax −Returning string valueinputEmailObject.typeSetting type to string valueinputEmailObject.type = stringValueString ValuesHere, “stringValue” can be the following −stringValueDetailsemailIt defines that input type is emaildatetime-localIt defines that input type is datetime-localradioIt defines that input type is radiotelIt defines ... Read More

HTML DOM Input Email value Property

AmitDiwan

AmitDiwan

Updated on 30-Jul-2019 22:30:26

71 Views

The HTML DOM Input Email value property returns a string, which is the value attribute of input Email. User can also set it to a new string.SyntaxFollowing is the syntax −Returning string valueinputEmailObject.valueSetting value attribute to a string valueinputEmailObject.value = ‘String’ExampleLet us see an example of Input Email value property − Live ... Read More

Advertisements