Found 10483 Articles for Web Development

HTML DOM Input Text disabled Property

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

278 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 greyed out by default and is unclickable.SyntaxFollowing is the syntax for −Setting the disabled property −textObject.disabled = true|false;Here, true=the text field is disabled and false=the text field is not disabled. It is false by default.ExampleLet us look at an example for the Input Text disabled property −Live Demo ... Read More

HTML DOM Input Text defaultValue Property

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

504 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 the value property value changes based on the user input in the input field.SyntaxFollowing is the syntax to set the defaultValue property −textObject.defaultValue = valueHere, “value” is the text field default value.ExampleLet us look at an example for the Text defaultValue property −Live Demo Input Text defaultValue Property ... Read More

HTML DOM Input Text autofocus Property

AmitDiwan
Updated on 19-Aug-2019 11:40:11

177 Views

The HTML DOM input Text autofocus property is associated with the HTML element’s autofocus attribute. This property is used for setting or returning if the input text field should be automatically focused when the page loads or not.SyntaxFollowing is the syntax for −Setting the autofocus property −textObject.autofocus = true|falseHere, true represents the text field should get focus and false represents otherwise. It is set to false by default.ExampleLet us look at an example for the HTML DOM Input text autofocus property − Input text autofocus property USERNAME: CHECK FOCUS    function FocusVal() { ... Read More

HTML DOM Input Text autocomplete Property

AmitDiwan
Updated on 19-Aug-2019 11:37:35

201 Views

The HTML DOM Input Text autocomplete property is associated with the autocomplete attribute of the element with type=”text”. The autocomplete attribute takes “on” or “off” value. The on value specifies that the web browser must automatically complete user text based on previous input while false states otherwise.SyntaxFollowing is the syntax for −Setting the autocomplete Property −textObject.autocomplete = "on|off"Here, on means the browser will complete the user input automatically based on previous input while false states that it will not complete any of the user input based on previous inputs. It has the value set to on by default.ExampleLet us ... Read More

HTML DOM Input Submit value Property

AmitDiwan
Updated on 19-Feb-2021 05:43:04

188 Views

The HTML DOM Input submit value property is associated with the input element having type=”submit” and the value attribute. It is used to return the value of submit button value attribute or to set it. The value property for submit button changes the text displayed on button as by default the text is “Submit”.SyntaxFollowing is the syntax for −Setting the value property −submitObject.value = text;Here, text is used for specifying the text displayed on the submit button.ExampleLet us look at an example for the input submit value property −Live Demo Input submit Value property UserName: ... Read More

HTML DOM Input Submit type Property

AmitDiwan
Updated on 19-Feb-2021 05:45:45

114 Views

The HTML DOM Input Submit type property is associated with the input element having its type=”submit”. It will always return submit for the input submit element.SyntaxFollowing is the syntax for submit type property −submitObject.typeExampleLet us look at an example for the submit type property − Input range type Property VOLUME Get the above input element type by clicking the below button GET Type    function rangeType() {       var P=document.getElementById("RANGE1").type;       document.getElementById("Sample").innerHTML = "The type for the input field is: "+P ;    } OutputThis will produce the following output −On clicking the “GET Type” button −

HTML DOM Input Submit object property

AmitDiwan
Updated on 19-Feb-2021 05:47:18

152 Views

The HTML DOM Input Submit object is associated with the element with type “submit”. We can create and access an input element with type submit by using the createElement() method and getElementById() method respectively.PropertiesFollowing are the properties for the Input submit object −PropertyDescriptionautofocusTo set or return if the submit button should get focus automatically when the page loads or not.defaultValueTo set or return the submit button default value.disabledTo set or return if the submit button has been disabled, or not.formTo return the reference of the form containing the submit button.formActionTo set to return the formaction attribute value of a ... Read More

HTML DOM Input Submit name property

AmitDiwan
Updated on 19-Feb-2021 05:49:16

137 Views

The HTML DOM Input Submit name property is used for setting or returning the name attribute of a submit button. The name attribute helps in identifying the form data after it has been submitted to the server.SyntaxFollowing is the syntax for −Setting the name property −submitObject.name = nameHere, name is for specifying the submit button name.ExampleLet us look at an example for the Submit name property −Live Demo Input submit name Property UserName: Location: Change the name of the above submit button by clicking the below button CHANGE NAME ... Read More

HTML DOM Input Submit formTarget property

AmitDiwan
Updated on 19-Feb-2021 05:50:41

127 Views

The HTML DOM Input Submit formTarget property is used for setting or returning the formTarget attribute value of a submit button. The HTML DOM Input Submit formTarget property is where the response from server should be displayed after the form data being submitted. The formTarget property overrides the target property of the form element. It introduced in HTML5 for input element with type submit.SyntaxFollowing is the syntax for −Setting the formTarget property −submitObject.formTarget = "_blank|_self|_parent|_top|framename"Here, _blank will open the response in new window;_self will open the response in the same window; parent will open in the parent frame ; _top ... Read More

HTML DOM Input Submit formNoValidate property

AmitDiwan
Updated on 19-Aug-2019 11:20:17

97 Views

The HTML DOM Input Submit formNoValidate property is used for setting or returning the formNoValidate attribute value of a submit button. The formNoValidate property is used for indicating if the form data should be validated or not when submitted to the server. It overrides the novalidate property of the element. This property introduced in HTML5 for input element with type submit.Following is the syntax for −Setting the formNoValidate property −submitObject.formNoValidate = true|falseHere, true specifies the form data should not be validated while false denotes the data must be validated. The default value for this is false.ExampleLet us look at ... Read More

Advertisements