AmitDiwan has Published 10744 Articles

HTML DOM Input Text defaultValue Property

AmitDiwan

AmitDiwan

Updated on 19-Feb-2021 05:40:59

501 Views

The HTML DOM Input Text defaultValue property is used for setting or getting the defaultValue of a text field. The defaultValue of an element is the value assigned to the value attribute. The difference between value property and defaultValue property is the latter retains the original default value specified while ... Read More

HTML DOM Input Text disabled Property

AmitDiwan

AmitDiwan

Updated on 19-Feb-2021 05:38:57

276 Views

The HTML DOM Input Text disabled property is used for setting or returning if the text field should be disabled or not. It uses boolean values with true representing the element should be disabled and false otherwise. The disabled property is set to false by default. The disabled element is ... Read More

HTML DOM Input Text form Property

AmitDiwan

AmitDiwan

Updated on 19-Feb-2021 05:36:31

139 Views

The HTML DOM Input Text form property is used for returning the form reference that contains the input text field. If the input text field is outside the form then it will simply return NULL. This property is read-only.SyntaxFollowing is the syntax for input text form property.textObject.formExampleLet us look at ... Read More

HTML DOM Input Text maxLength Property

AmitDiwan

AmitDiwan

Updated on 19-Feb-2021 05:34:52

198 Views

The HTML DOM Input Text maxLength property is used for setting or returning the maxlength attribute of the input text field. The maxLength property specifies the maximum number of characters you can type in a text field.SyntaxFollowing is the syntax for −Setting the maxLength property −textObject.maxLength = integerHere, integer specifies ... Read More

HTML DOM Input Text name Property

AmitDiwan

AmitDiwan

Updated on 19-Feb-2021 05:33:23

167 Views

The HTML DOM Input Text name property is used for setting or returning the name attribute of an input text field. The name attribute helps in identifying the form data after it has been submitter to the server.SyntaxFollowing is the syntax for −Setting the name property −textObject.name = nameHere, name ... Read More

HTML DOM Input Text required property

AmitDiwan

AmitDiwan

Updated on 19-Feb-2021 05:31:10

152 Views

The HTML DOM input Text required property is associated with the required attribute of an element. The required property is used for setting and returning if it is necessary to fill some text field or not before the form is submitted to the server. This allows the form to ... Read More

HTML DOM source object

AmitDiwan

AmitDiwan

Updated on 19-Feb-2021 05:29:24

106 Views

The HTML DOM source object is associated with the HTML element. We can create and access source element using the createElement() and getElementById() method respectively.SyntaxFollowing is the syntax for −Creating a source object −var p= document.createElement("SOURCE");ExampleLet us look at an example for the source object −Live Demo ... Read More

HTML DOM Span object

AmitDiwan

AmitDiwan

Updated on 19-Feb-2021 05:27:35

2K+ Views

The HTML DOM span object is associated with the HTML element. We can create and access span element using the createElement() and getElementById() method respectively.SyntaxFollowing is the syntax for −Creating a span object −var a = document.createElement("SPAN");ExampleLet us look at an example for the span object −Live Demo ... Read More

HTML DOM stopPropagation() Event method

AmitDiwan

AmitDiwan

Updated on 19-Feb-2021 05:24:19

1K+ Views

The HTML DOM stopPropagation() event method is used for stopping the propagation of the given element. This means that clicking on the parent element won’t propagate to children and clicking on the children elements won’t propagate to parent using the stopPropagtion() method. The event propagation is also called event bubbling.SyntaxFollowing ... Read More

HTML DOM Storage getItem() method

AmitDiwan

AmitDiwan

Updated on 19-Feb-2021 05:21:20

128 Views

The HTML DOM Storage getItem() method is used for obtaining a storage object by passing a given key name. It will return the key’s values and if there is no key with that given name then NULL will be returned.SyntaxFollowing is the syntax for Storage getItem() method −localStorage.getItem(keyname);ORsessionStorage.getItem(keyname);Here, keyname is ... Read More

Advertisements