Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
-
Economics & Finance
Web Development Articles
Page 53 of 801
HTML DOM Input Week stepDown( ) Method
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 MoreHTML DOM Input Week stepUp( ) Method
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 MoreHTML DOM Input Week type Property
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 MoreHTML DOM InputEvent inputType Property
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 MoreHTML DOM Label htmlFor Property
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 MoreHTML DOM Legend form Property
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 MoreHTML DOM li value Property
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 MoreHTML DOM Link type Property
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 MoreHTML DOM Location hostname Property
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 MoreHTML DOM Location port Property
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