Found 10483 Articles for Web Development

HTML DOM Button autofocus Property

AmitDiwan
Updated on 06-Aug-2019 14:12:45

157 Views

The HTML DOM Button autofocus property is associated with autofocus property of the element. The button autofocus property is used to specify whether a button on the HTML document should get the focus or not when the page loads.SyntaxFollowing is the syntax for −Setting the button autofocus property −buttonObject.autofocus = true|falseHere, the true|false specifies if the given input button should get the focus on not when the page loads.True − Input button gets focusFalse − Input button doesn’t get focus.ExampleLet us see an example for the HTML DOM button autofocus property − BUTTON Click the below button to know ... Read More

HTML DOM Bold object

AmitDiwan
Updated on 06-Aug-2019 14:06:12

486 Views

The HTML DOM bold object is associated with the html (bold) tag. The tag is used to make the text inside the tag bold .Using the bold object we can access the HTML tag.SyntaxFollowing is the syntax for −Creating a bold object −var x = document.createElement("B");ExampleLet us see an example for the HTML DOM Bold object − Click the below button to create a element with some text CREATE    function createBold() {       var x = document.createElement("B");       var t = document.createTextNode("SAMPLE BOLD TEXT");     ... Read More

HTML DOM Body property

AmitDiwan
Updated on 20-Feb-2021 06:15:52

153 Views

The HTML DOM body property associated with HTML element is used to set or return property values of the element. It returns the element. It can be used to change content inside the element. This property can overwrite child elements content present inside the element.SyntaxFollowing is the syntax for −Setting the body property −document.body = New_ContentHere, New_Content is the new content for the element.ExampleLet us see an example for the HTML DOM Body property −Live Demo Sample HEADING Click the below button to overwrite child content Overwrite Content A sample paragraph   ... Read More

HTML DOM Body object

AmitDiwan
Updated on 06-Aug-2019 14:17:32

347 Views

The HTML DOM Body object is associated with the HTML element. The attributes and their values set inside the body tag stay throughout the HTML document unless they are overridden by any of its child node.The body object can be used to access and manipulate these properties and their values.PropertiesFollowing are the properties for HTML DOM Body object −Note − The properties below are not supported in HTML5 .Use CSS instead −PropertyDesciptionaLinkTo set or return the active link color in a document.backgroundTo set or return the background image for the documentbgColorTo set or return the background color of the ... Read More

How to encode a string in JavaScript?

Lokesh Yadav
Updated on 09-Dec-2022 05:33:56

26K+ Views

In this article we are going to learn how to encode a string in JavaScript with appropriate examples. Encoding is the process of converting from one data format to another format. In computer science terms, encoding is the process of converting a text into a cipher text. Encoding is different from the Encryption process. The difference between encoding and encryption is where the encoding is used to keep data usable and data confidentiality is maintained by encryption. Encoding does not use a key for encoding process whereas for encryption there should be a key for encryption process. The methods that ... Read More

HTML DOM blockquote object

AmitDiwan
Updated on 20-Feb-2021 06:19:06

187 Views

The HTML DOM blockquote basically represent the HTML element . The element does not add any quotation marks unlike the tag. We can create and access properties with the help of the blockquote object.SyntaxFollowing is the syntax for −Creating the blockquote object −var x = document.createElement("BLOCKQUOTE");ExampleLet us see an example of the blockquote object −Live Demo Click on the below button to create a blockquote object CREATE    function createBloc() {       var x = document.createElement("BLOCKQUOTE");       var t = document.createTextNode("This is a random block quote.This is some sample text."); ... Read More

HTML DOM blockquote cite Property

AmitDiwan
Updated on 06-Aug-2019 14:39:29

164 Views

The HTML DOM blockquote cite property is associated with the HTML element. This property is used to set or return the cite attribute of the quote. The cite property is useful for screen readers and not so much for normal user as it doesn’t have any visual effect on the web page. The cite property is used to set the source url of the quote.SyntaxFollowing is the syntax for −Setting the cite property −blockquoteObject.cite = URLHere, URL specifies the quotation location.ExampleLet us see an example for the blockquote cite property − Quote Here is a quote: ... Read More

HTML DOM Bdo object

AmitDiwan
Updated on 20-Feb-2021 06:20:37

151 Views

The HTML DOM Bdo object is associated with the element in HTML. The bdo stands for Bi-Directional Override. It is used for creating and accessing a bdo object. It has only one property “dir”. The text direction by default is left to right but can be overridden with the element. The bdo object represents the element.propertiesFollowing is the bdo object property −PropertyDescriptiondirSets or returns the value of the dir attribute of a elementSyntaxFollowing is the syntax for −Creating a bdo object −var a = document.createElement("BDO");Accessing a bdo object −var a = document.getElementById("demoBdo");ExampleLet us see an example ... Read More

HTML DOM Bdo dir Property

AmitDiwan
Updated on 06-Aug-2019 14:13:53

154 Views

The HTML DOM Bdo dir property is associated with the HTML element. Here, bdo stands for Bi-Directional Override. The tag is used to override the current text direction which is by default left to right. The bdo dir property sets or returns the dir attribute value of a element. The dir property is compulsory for the element. It specifies the direction of the text flow.SyntaxFollowing is the syntax for −Setting the dir property −bdoObject.dir = "ltr|rtl"Here, ltr is left-to-right text direction, whereas rtl is right-to-left text direction.Returning the dir property −bdoObject.dirExampleLet us see an example for HTML ... Read More

HTML DOM Base object

AmitDiwan
Updated on 06-Aug-2019 14:24:15

177 Views

The HTML DOM Base object is associated with the HTML element. The element is used to specify the base url for all other URLs in the HTML document. There can at most one element in an HTML document. The Base object is used to set or get the href attribute of the element.PropertiesFollowing are the properties of Base object −PropertyDescriptionhrefSets or returns the value of the href attribute in a base elementtargetSets or returns the value of the target attribute in a base elementSyntaxFollowing is the syntax for −Creating the base element −document.createElement ("base")Accessing the base ... Read More

Advertisements