Found 2202 Articles for HTML

HTML DOM Fieldset form property

AmitDiwan
Updated on 19-Aug-2019 06:57:00

173 Views

The HTML DOM Fieldset form property returns the form reference of the type form object. This is for the element that is present inside that given form. It is a read-only property. If the specified fieldset isn’t present inside the form then null is returnedSyntaxFollowing is the syntax for the fieldset form property −fieldsetObject.formExampleLet us look at an example for the fieldset form property −    function formId() {       var field = document.getElementById("FieldSet1").form.id;       document.getElementById("Sample").innerHTML = "The id of the form in which fieldset       element is present is ... Read More

HTML DOM Fieldset disabled property

AmitDiwan
Updated on 19-Feb-2021 08:03:10

394 Views

The HTML DOM Fieldset disabled property is used for disabling the group of elements that are present inside a given fieldset. If this property is set to true then the elements are disabled else they are enabled, which is by default as well. Disabled elements are rendered in grey by default by browsers and users can’t click or write in those elements.SyntaxFollowing is the syntax −To set the disabled property −fieldsetObj.disabled = true|falseTo return the disabled property −fieldsetObj.disabledExampleLet us look at an example for the Fieldset disabled property −Live Demo    function FieldDisable() {       ... Read More

HTML DOM exitFullscreen() method

AmitDiwan
Updated on 19-Aug-2019 06:42:46

61 Views

The HTML DOM exitFullscreen() method is used for getting an element currently in the full screen mode to get out of that mode. It does nothing if executed on an element that isn’t in the full screen mode already.SyntaxFollowing is the syntax for exitFullscreen() method −HTMLElementObject.exitFullscreen()ExampleLet us look at an example for the exitFullscreen() method −    var docEle = document.documentElement;    function GoNormal() {       if (document.exitFullscreen)       document.exitFullscreen();    }    function GoFullscreen() {       if (docEle.requestFullscreen)       docEle.requestFullscreen();    } exitFullscreen() method example ... Read More

HTML DOM emphasized object

AmitDiwan
Updated on 19-Feb-2021 08:09:10

120 Views

The HTML DOM emphasized object is associated with the HTML element. The element is used for emphasizing some text and it marks that text in italic. You can create and access emphasized object using createElement() or getElementById() method respectively.SyntaxFollowing is the syntax for −Creating an emphasized object −var e = document.createElement("EM");ExampleLet us look at an example for the emphasized object −Live Demo emphasized object example Create an em element by clicking the button below CREATE    function createEM() {       var e = document.createElement("EM");       var txt = document.createTextNode("HELLO WORLD"); ... Read More

HTML DOM Input Password name Property

AmitDiwan
Updated on 19-Feb-2021 08:10:20

142 Views

The HTML DOM Input Password name property is used for setting or returning the name attribute of an input password 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 −passwordObject.name = nameHere, name is for specifying the password field name.ExampleLet us look at an example for the password name property −Live Demo Input Password name Property Password: Change the name of the password field by ... Read More

HTML DOM Input Password maxLength Property

AmitDiwan
Updated on 19-Feb-2021 08:11:34

406 Views

The HTML DOM Input Password maxlength property is used for setting or returning the maxlength attribute of the input password field. The maxLength property specifies the maximum number of characters you can type in a password field.SyntaxFollowing is the syntax for −Setting the maxLength property −passwordObject.maxLength = integerHere, integer specifies the maximum number of characters that can be typed in the password field.ExampleLet us look at an example for the maxLength form property −Live Demo Input Password maxLength Property Password: Increase the maximum number of characters to be entered for the above field by clicking below button ... Read More

HTML DOM Input Password form Property

AmitDiwan
Updated on 19-Feb-2021 09:01:52

177 Views

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

HTML DOM Input Password disabled Property

AmitDiwan
Updated on 19-Feb-2021 09:05:34

175 Views

The HTML DOM Input Password disabled property is used for setting or returning whether the password field is 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 −passwordObject.disabled = true|false;Here, true=password field is disabled and false=the password field is not disabled. It is false by default.ExampleLet us look at an example for the Input password disabled property −Live Demo Input Password ... Read More

HTML DOM Input Password defaultValue Property

AmitDiwan
Updated on 19-Feb-2021 09:07:25

304 Views

The HTML DOM Input Password defaultValue property is used for setting or getting the defaultValue of a password field. The defaultValue of an element is the value assigned to the value attribute. The difference between value property and defaultValue property is that the defaultValue property retains the original default value specified while the value property change based on the user input in the input field.SyntaxFollowing is the syntax to set the defaultValue property −passwordObject.defaultValue = valueHere, “value” is the password field default value.ExampleLet us look at an example for the Input Password defaultValue property −Live Demo Input Password ... Read More

HTML DOM Input Password autofocus Property

AmitDiwan
Updated on 09-Aug-2019 10:40:30

334 Views

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

Advertisements