AmitDiwan has Published 10740 Articles

HTML DOM Summary Object

AmitDiwan

AmitDiwan

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

104 Views

The HTML DOM summary Object represent the element of an HTML document.Let us now see how to create summary object −SyntaxFollowing is the syntax −document.createElement(“SUMMARY”);ExampleLet us see an example of HTML DOM summary object − Live Demo    body {       text-align: center;     ... Read More

HTML DOM Location hash Property

AmitDiwan

AmitDiwan

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

276 Views

The Location hash property returns/appends a string value (anchor part) to a URL. Anchor part is prefixed with ‘#’ automatically and then appended.SyntaxFollowing is the syntax −Returning value of the hash propertylocation.hashValue of the hash property setlocation.hash = ‘string’ExampleLet us see an example for Location hash property − Live Demo ... Read More

HTML DOM Table Object

AmitDiwan

AmitDiwan

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

792 Views

The HTML DOM table Object represent the element of an HTML document.Let us see how to create table objectSyntaxFollowing is the syntax −document.createElement(“TABLE”);PropertiesFollowing are the properties of table object −PropertyExplanationcaptionIt returns element of a table in an HTML document.tFootIt returns element of a table in an HTML ... Read More

HTML DOM Location host Property

AmitDiwan

AmitDiwan

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

167 Views

The Location host property returns/sets the hostname and host port (if specified). Port might not get displayed if not explicitly specified.SyntaxFollowing is the syntax −Returning value of the host propertylocation.hostValue of the host property setlocation.host = hostname:hostExampleLet us see an example for Location host property − Live Demo Location host    form ... Read More

HTML DOM Location hostname Property

AmitDiwan

AmitDiwan

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

391 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

179 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

129 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

158 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

129 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

129 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

Advertisements