Found 10483 Articles for Web Development

HTML DOM Input Password size property

AmitDiwan
Updated on 22-Aug-2019 09:12:03

175 Views

The HTML DOM Input Password size property is used for setting or returning the input password size attribute value. It is used for defining the password field width in terms of characters. The default width is of 20 characters.SyntaxFollowing is the syntax for −Setting the password size property −passwordObject.size = numberHere, number represents the password field width in characters. The default width is 20 characters.ExampleLet us look at an example for the Input password size property − Input password size property Password: Change the Password field width by clicking the below button CHANGE    function ... Read More

HTML DOM Input Password required property

AmitDiwan
Updated on 22-Aug-2019 09:04:18

166 Views

The HTML DOM input password 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 password field or not before the form is submitted to the server. This allows the form to not submit if a password field with required attribute is left empty by the user.SyntaxFollowing is the syntax for −Setting the required property −textObject.required = true|falseHere, true represents the text field must be filled while false represents its optional to fill the field before submitting the form.ExampleLet us look at ... Read More

HTML DOM Input Password readOnly property

AmitDiwan
Updated on 22-Aug-2019 08:52:39

155 Views

The HTML DOM Input Password readOnly property is used for setting or returning whether the input password field is read-only or not. The readOnly property makes the element non-editable but it can still be focused by tab or by clicking. If there is a default value inside a read-only element then it is sent to server on submit.SyntaxFollowing is the syntax for −Set the readOnly property −passwordObject.readOnly = true|falseHere, true represents the password field is read only while false represents otherwise. The readOnly property is set to false by default.ExampleLet us look at an example for the password readOnly property ... Read More

HTML DOM Input Password placeholder property

AmitDiwan
Updated on 22-Aug-2019 08:37:42

400 Views

The HTML DOM Input Password placeholder property is used for setting or returning the placeholder attribute value of an input password field. The placeholder property is used for giving the web page users a hint about the input element by showing a text inside the input field befor the user inputs anything. The placeholder text is greyed by default and isn’t submitted to the form unlike the value property.SyntaxFollowing is the syntax for −Setting the placeholder property −passwordObject.placeholder = textHere, text represents the placeholder text specifying the hint for the user about the password field.ExampleLet us look at an example ... Read More

HTML DOM Input Password pattern property

AmitDiwan
Updated on 22-Aug-2019 08:28:31

418 Views

The HTML DOM Input Password pattern property is used for setting or returning the pattern attribute of an input password field. It checks the password against a regular expression specified by the pattern property.SyntaxFollowing is the syntax forSetting the pattern property −passwordObject.pattern = regexpHere, regexp is a regular expression against which the password field is checked.ExampleLet us look at an example for the password pattern property − Input Password pattern property The password can either be of three numeric characters or 6 alphabet characters from a to g Password: GET PATTERN   ... Read More

HTML DOM Input Password object

AmitDiwan
Updated on 22-Aug-2019 08:17:52

261 Views

The HTML DOM Input Password object is associated with the element with type “password”. We can create and access an input element with type password using the createElement() and getElementById() methods respectively.PropertiesFollowing are the properties for the password object −Sr.NoProperty & Description1autocompleteTo set or return the autocomplete attribute value of a password field2autofocusTo set or return if the password field should automatically get focus when the page loads.3defaultValueTo set or return the password field default value.4disabledTo set or return whether the password field is disabled, or not.5formTo return the reference of the form containing the password field6maxLengthTo set or ... Read More

HTML DOM Input Radio required property

AmitDiwan
Updated on 15-Feb-2021 05:03:21

217 Views

The HTML DOM input radio 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 check some radio button or not before the form is submitted to the server. This allows the form to not submit if a radio button with required attribute is left unchecked by the user.SyntaxFollowing is the syntax for −Setting the required property.radioObject.required = true|falseHere, true represents the radio button must be checked while false represents its optional to check the radio button before submitting the form.ExampleLet us look at ... Read More

HTML DOM Input Radio object

AmitDiwan
Updated on 15-Feb-2021 05:05:50

199 Views

The HTML DOM Input radio object is associated with the element with type “radio”. We can create and access an input element with type radio using the createElement() and getElementById() method respectively.PropertiesFollowing are the properties of the Input Radio object −Sr.NoProperties & Description1AutofocusTo set or return if the radio button should get focus automatically when the page loads or not.2CheckedTo set or return the radio button checked state.3defaultCheckedTo return the checked attribute default value for a radio button4defaultValueTo set or return the radio button default value.5DisabledTo set or return whether the radio button should e disabled, or not6FormTo return ... Read More

HTML DOM Input Radio name Property

AmitDiwan
Updated on 15-Feb-2021 05:08:32

161 Views

The HTML DOM Input radio name property is used for setting or returning the name attribute of an input radio field. The name attribute helps in identifying the form data after it has been submitted to the server. JavaScript can also use the name attribute to refer form elements to manipulate later on.SyntaxFollowing is the syntax for −Setting the name property.radioObject.name = nameHere, name is for specifying the radio button name.ExampleLet us look at an example for the radio name property −Live Demo Input radio name Property FRUIT: Orange Change the name of the above radio ... Read More

HTML DOM Input Radio form Property

AmitDiwan
Updated on 21-Aug-2019 06:57:36

152 Views

The HTML DOM Input Radio form property is used for returning the form reference that contains the given input radio button. If the radio button is outside the form then it will simply return NULL. This property is read-only.SyntaxFollowing is the syntax for input radio form property −radioObject.formExampleLet us look at an example for the Input radio form property. Input radio form Property FRUIT: Mango Get the form id by clicking on the below button GET FORM    function formId() {       var P=document.getElementById("Mango").form.id;       document.getElementById("Sample").innerHTML = "The id of ... Read More

Advertisements