Web Development Articles

Page 53 of 801

HTML DOM Input Week stepDown( ) Method

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 152 Views

The HTML DOM Input Week stepDown() method decreases the value of a week input field by a specified number of weeks. This method is useful for programmatically adjusting week values without direct user input manipulation. Syntax Following is the syntax for the stepDown() method − inputWeekObject.stepDown(number) Parameters The stepDown() method accepts the following parameter − number (optional) − A numeric value representing the number of weeks to decrease. If not specified, the default value is 1. Return Value The method does not return any value. It directly modifies ...

Read More

HTML DOM Input Week stepUp( ) Method

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 119 Views

The HTML DOM Input Week stepUp() method is used to increase the value of a week input field by a specified number of weeks. This method provides a programmatic way to increment the week value without requiring user interaction. Syntax Following is the syntax for the stepUp() method − inputWeekObject.stepUp(number) Parameters The stepUp() method accepts the following parameter − number (optional) − A numeric value that specifies how many weeks to increase the input value by. If omitted, the default value is 1. Return Value This method does ...

Read More

HTML DOM Input Week type Property

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 189 Views

The HTML DOM Input Week type property is used to get or set the type attribute of an input element that is initially of type "week". This property allows you to dynamically change the input type or retrieve its current type value using JavaScript. Syntax Following is the syntax for getting the type property − inputWeekObject.type Following is the syntax for setting the type property − inputWeekObject.type = stringValue Return Value The property returns a string representing the current type of the input element. For a week input, it ...

Read More

HTML DOM InputEvent inputType Property

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 157 Views

The HTML DOM InputEvent inputType property returns a string indicating the type of input action that triggered an input event. This property helps identify whether the user is typing text, deleting content, pasting, or performing other input operations on form elements. Syntax Following is the syntax for accessing the inputType property − event.inputType Return Value The inputType property returns a string representing the type of input. Common values include − "insertText" − When user types regular text "deleteContentBackward" − When user presses Backspace "deleteContentForward" − When user presses Delete "insertParagraph" − ...

Read More

HTML DOM Label htmlFor Property

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 258 Views

The HTML DOM Label htmlFor property is used to get or set the value of the for attribute of a label element. The for attribute creates an association between a label and a form control, improving accessibility and user experience by allowing users to click the label to focus or activate the associated form element. Syntax Following is the syntax for getting the for attribute value − labelObject.htmlFor Following is the syntax for setting the for attribute value − labelObject.htmlFor = "elementId" Return Value The htmlFor property returns a ...

Read More

HTML DOM Legend form Property

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 173 Views

The HTML DOM Legend form property returns a reference to the form element that contains the element. This property is read-only and provides access to the parent form for DOM manipulation and validation purposes. Syntax Following is the syntax for accessing the form property − legendObject.form Return Value The form property returns a reference to the HTMLFormElement object that contains the legend, or null if the legend is not inside a form. Example Let us see an example demonstrating the Legend form property − ...

Read More

HTML DOM li value Property

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 221 Views

The HTML DOM li value property allows you to get or set the value attribute of a element. This property is particularly useful when working with ordered lists where you need to control the numbering sequence or create custom list item values. Syntax Following is the syntax for getting the value attribute − liObject.value Following is the syntax for setting the value attribute − liObject.value = "string" Parameters string − A string value that represents the numeric value for the list item. This must be a ...

Read More

HTML DOM Link type Property

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 172 Views

The HTML DOM Link type property sets or returns the MIME type of a linked document. This property corresponds to the type attribute of HTML elements and helps browsers understand how to handle the linked resource. Syntax Following is the syntax for getting the type property − linkObject.type Following is the syntax for setting the type property − linkObject.type = value Parameters The value parameter represents a string specifying the MIME type of the linked document. Common valid values include − text/css − For CSS stylesheets ...

Read More

HTML DOM Location hostname Property

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 435 Views

The Location hostname property is part of the HTML DOM Location object that allows you to get or set the hostname portion of the current URL. The hostname is the domain name part of a URL, excluding the protocol, port number, and path. Syntax Following is the syntax to get the hostname property − location.hostname Following is the syntax to set the hostname property − location.hostname = hostname Return Value The hostname property returns a string representing the domain name of the URL. For example, if the URL is ...

Read More

HTML DOM Location port Property

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 161 Views

The HTML DOM Location port property returns or sets the port number of the current URL. If no port is explicitly specified in the URL, it returns an empty string. Common default ports (80 for HTTP, 443 for HTTPS) are typically not displayed unless explicitly set. Syntax Following is the syntax to get the port number − location.port Following is the syntax to set the port number − location.port = portNumber Return Value The location.port property returns a string representing the port number. If no port is specified, it ...

Read More
Showing 521–530 of 8,010 articles
« Prev 1 51 52 53 54 55 801 Next »
Advertisements