HTML Articles

Page 22 of 151

HTML DOM del dateTime Property

AmitDiwan
AmitDiwan
Updated on 11-Mar-2026 165 Views

The HTML DOM del dateTime property associated with the HTML element is used for telling the user when some text on the website was deleted. It tells the date and time of when the text was deleted.SyntaxFollowing is the syntax for −Setting the dateTime property −delObject.dateTime = YYYY -MM-DDThh:mm:ssTZDHere, YYYY=years , MM=months , DD=days, T=separator or a space, hh=hours , mm=minutes, ss=seconds, TZD=Time zone designatorExampleLet us look at an example for the del dateTime property − del dateTime property example    #Sample{color:blue}; del dateTime property example Some text has been deleted Click the ...

Read More

HTML DOM Del object

AmitDiwan
AmitDiwan
Updated on 11-Mar-2026 184 Views

The HTML DOM Del object is associated with the HTML element. It is used to represent the element. Using the Del object we can create and access a elememt.PropertiesFollowing are the properties for the Del object −Sr.NoProperties & Description1citeTo set or return the cite attribute value of the deleted text.2dateTimeTo set or return the datetime attribute value of the deleted text.SyntaxFollowing is the syntax for −Creating a Del object −var p = document.createElement("DEL");ExampleLet us look at an example for the HTML DOM Del object − del object example Click on the below button to create ...

Read More

HTML DOM Input Radio defaultChecked Property

AmitDiwan
AmitDiwan
Updated on 11-Mar-2026 171 Views

The HTML DOM Input Radio defaultChecked property checks whether the radio button has been checked by default or not. It returns true if the radio button is checked otherwise it will return false.SyntaxFollowing is the syntax for Radio defaultChecked property −radioObject.defaultCheckedExampleLet us look at an example of the Radio defaultChecked property − Input Radio defaultChecked property FRUIT: Mango CHECK    function checkDefault() {       var c = document.getElementById("Mango").checked;       document.getElementById("Sample").innerHTML = "The button default checked value is "+c;    } OutputThis will produce the following output −On ...

Read More

HTML DOM Input Radio name Property

AmitDiwan
AmitDiwan
Updated on 11-Mar-2026 200 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 − Input radio name Property FRUIT: Orange Change the name of the above radio button ...

Read More

HTML DOM Input Radio object

AmitDiwan
AmitDiwan
Updated on 11-Mar-2026 238 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 required property

AmitDiwan
AmitDiwan
Updated on 11-Mar-2026 262 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 Password type property

AmitDiwan
AmitDiwan
Updated on 11-Mar-2026 184 Views

The HTML DOM Input password type property is associated with the input element having its type=”password”. It will always return password for the input password element.SyntaxFollowing is the syntax for password type property −passwordObject.typeExampleLet us look at an example for the Input password type property − password type property PASSWORD: Get the above element type by clicking the below button Get Type    function getType() {       var t = document.getElementById("PASS1").type;       document.getElementById("Sample").innerHTML = "The type for the input field is : "+t;    } OutputThis will produce the ...

Read More

HTML DOM Input Radio type property

AmitDiwan
AmitDiwan
Updated on 11-Mar-2026 218 Views

The HTML DOM Input radio type property is associated with the input element having its type=”radio”. It will always return radio for the input radio element.SyntaxFollowing is the syntax for radio type property −radioObject.typeExampleLet us look at an example for the radio type property − Input radio type Property FRUIT: Mango Get the above input element type by clicking the below button GET Type    function radioType() {       var P=document.getElementById("Mango").type;       document.getElementById("Sample").innerHTML = "The type for the input field is: "+P ;    } OutputThis will ...

Read More

HTML DOM Input Radio value Property

AmitDiwan
AmitDiwan
Updated on 11-Mar-2026 248 Views

The HTML DOM Input radio value property is associated with the input element having type=”radio” and the value attribute. It is used to return the value of radio button value attribute or to set it.The value property for radio button doesn’t affect the user interface of the website as the content is simply not displayed. However it can be used to distinguish between several buttons of the same group when the form is submitted.SyntaxFollowing is the syntax for −Set the value property −radioObject.value = text;Here, text is used for specifying the value for the radio button.ExampleLet us look at an ...

Read More

HTML DOM Input Range form property

AmitDiwan
AmitDiwan
Updated on 11-Mar-2026 167 Views

The HTML DOM Input Range form property is used for returning the form reference that contains the given input range slider. If the range slider is outside the form then it will simply return NULL. This property is read-only.SyntaxFollowing is the syntax for input range form property.rangeObject.formExampleLet us look at an example for the Input range form property − Input range form Property Get the form id which contains the above range slider clicking on the below button GET FORM    function formId() {       var P=document.getElementById("RANGE1").form.id;       document.getElementById("Sample").innerHTML ...

Read More
Showing 211–220 of 1,508 articles
« Prev 1 20 21 22 23 24 151 Next »
Advertisements