Found 10483 Articles for Web Development

HTML DOM Input URL autofocus Property

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

143 Views

The HTML DOM Input URL autofocus property sets/returns whether Input URL is focused upon initial page load.SyntaxFollowing is the syntax −Returning boolean value - true/falseinputURLObject.autofocusSetting autofocus to booleanValueinputURLObject.autofocus = booleanValueBoolean ValuesHere, “booleanValue” can be the following −booleanValueDetailsTrueIt defines that input will be autofocused on page load.FalseIt is the default value and input is not autofocused.ExampleLet us see an example of Input URL autofocus property − Live Demo Input URL autofocus    form {       width:70%;       margin: 0 auto;       text-align: center;    }    * {       padding: 2px; ... Read More

HTML DOM Input URL autocomplete Property

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

157 Views

The HTML DOM Input URL autocomplete property sets/returns whether autocomplete is enabled or disabled. If enabled it shows previously typed values.SyntaxFollowing is the syntax −Returning value - on/offinputURLObject.autocompleteSetting autocomplete to valueinputURLObject.autocomplete = valueValuesHere, “value” can be the following −valueDetailsonIt defines that input has autocomplete attribute enabled.offIt defines that input autocomplete attribute is disabled.ExampleLet us see an example of Input URL autocomplete property − Live Demo Input URL autocomplete    form {       width:70%;       margin: 0 auto;       text-align: center;    }    * {       padding: 2px;       ... Read More

HTML DOM Input Time value Property

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

128 Views

The HTML DOM Input Time value property returns a string, which is the value of the value attribute of input Time. User can also set it to a new string.SyntaxFollowing is the syntax −Returning string valueinputTimeObject.valueSetting value attribute to a string valueinputTimeObject.value = ‘String’ExampleLet us see an example of Input Time value property − Live Demo Input Time value    form {       width:70%;       margin: 0 auto;       text-align: center;    }    * {       padding: 2px;       margin:5px;    }    input[type="button"] {       ... Read More

HTML DOM Input Time type Property

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

232 Views

The HTML DOM Input Time type property returns/sets type of Input Time.SyntaxFollowing is the syntax −Returning string valueinputTimeObject.typeSetting type to string valueinputTimeObject.type = stringValueString ValuesHere, “stringValue” can be the following −stringValueDetailstimeIt defines that input type is timedatetime-localIt defines that input type is datetime-localcheckboxIt defines that input type is checkboxtextIt defines that input type is textExampleLet us see an example of Input Time type property − Live Demo Input Time type    form {       width:70%;       margin: 0 auto;       text-align: center;    }    * {       padding: 2px; ... Read More

How to find the href attribute of a link in a document in JavaScript?

Lokesh Yadav
Updated on 08-Dec-2022 07:56:56

3K+ Views

In this following article we are going to learn how to find the href attribute of a link in a document in JavaScript. The DOM property in the JavaScript provides many properties like , , , , , . There are two ways we can represent the links in HTML DOM. The DOM object provides links property. The href attribute in the anchor tag specifies the URL. To get the href attribute, we need to find the anchor object reference. To get a better idea of this concept, let’s look into the syntax and usage of the href attribute of ... Read More

How to find the number of links in a document in JavaScript?

Lokesh Yadav
Updated on 08-Dec-2022 07:55:38

1K+ Views

In this article we are going to discuss how to find the number of links in a document in JavaScript. The DOM property in the JavaScript provides many properties like , , , , , . There are two ways through which we can represent the links in HTML DOM. The DOM object provides links property. The document.links property provides us a collection of and tags inside a document. The document.links property is similar to an array. We can access any property (like href, name, title) of the links using this property. To find the total number of ... Read More

How to get a particular anchor in a document in JavaScript?

Lokesh Yadav
Updated on 08-Dec-2022 07:54:19

2K+ Views

In this article we will learn how to get a particular anchor in a document in JavaScript. The Javascript anchor tags follow an array-like structure. When we try to display a particular anchor tag we have to use ,document.anchors.innerHTML method. This method works the same as array methods which are used to display a particular element. To get a better understanding let’s look into the usage and syntax of anchor tag in JavaScript. Syntax The syntax to get a particular anchor tag is shown below. document.anchors[i].innerHTML or document.getElementsByTagName(“a”)[i].innerHTML Example 1 The following is an example program to get a ... Read More

How to find a number of anchors in a document in JavaScript?

Lokesh Yadav
Updated on 08-Dec-2022 07:52:56

1K+ Views

This article discusses about how to find the number of anchors in a document in JavaScript. The anchor tag is a part of HTML DOM elements. The anchor property is a read only property that returns a list of anchor tags inside a document. The anchor object is represented as . There are two ways to get the length of the anchors object. One way is to use the anchors.length property that returns the number of anchor tags in a document. The other way is to use getElementByTagName method to access the anchor tag and use the length property. Both ... Read More

How to get the title and full URL of a document in JavaScript?

Lokesh Yadav
Updated on 08-Dec-2022 07:50:08

1K+ Views

In this article we will learn how to get the title and full URL of a document in JavaScript with the help of examples. The Javascript HTML DOM has provided some basic methods to access and manipulate the HTML data. To find the title and URL of a document, JavaScript has provided document.title and document.URL respectively. The document.title property − The document.title property returns the current title of the document. This property applies to HTML, SVG, XUL, and other documents. The syntax to get the title of the document is shown below. document.title The document.url property − The URL ... Read More

HTML DOM Input Time stepUp( ) Method

AmitDiwan
Updated on 01-Jul-2020 14:18:00

126 Views

The HTML DOM Input Time stepUp() method defines the number of minutes the Time field should increase.SyntaxFollowing is the syntax −Calling stepUp() method with a number, which by default is equal to 1inputTimeObject.stepUp(number)ExampleLet us see an example of Input Time stepUp method − Live Demo Input Time stepUp()    form {       width:70%;       margin: 0 auto;       text-align: center;    }    * {       padding: 2px;       margin:5px;    }    input[type="button"] {       border-radius: 10px;    } Time-stepUp( ) ... Read More

Advertisements