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 55 of 801
HTML DOM Input Number type Property
The HTML DOM Input Number type property is used to retrieve the type attribute value of an input element with type="number". This property is read-only and always returns the string "number" for number input elements. Syntax Following is the syntax to get the type property of a number input element − numberObject.type Return Value The type property returns a string representing the type attribute value. For input elements with type="number", it always returns "number". Example − Getting Input Number Type Following example demonstrates how to retrieve the type property of an ...
Read MoreHTML DOM Input Password defaultValue Property
The HTML DOM Input Password defaultValue property sets or retrieves the default value of a password field. The defaultValue represents the original value specified in the HTML value attribute, while the value property reflects the current user input. The defaultValue remains constant even when users type in the field. Syntax Following is the syntax to set the defaultValue property − passwordObject.defaultValue = value Following is the syntax to get the defaultValue property − var defaultVal = passwordObject.defaultValue Parameters The defaultValue property accepts the following parameter − value ...
Read MoreHTML DOM Input Password disabled Property
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. Syntax Following is the syntax for setting the disabled property − passwordObject.disabled = true|false; Following is the syntax for getting the disabled property − var isDisabled = passwordObject.disabled; Here, true means the password field ...
Read MoreHTML DOM Input Password name Property
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 reference form elements for manipulation. Syntax Following is the syntax for setting the name property − passwordObject.name = name Following is the syntax for getting the name property − var name = passwordObject.name Parameters The name parameter is a string that specifies the ...
Read MoreHTML DOM emphasized object
The HTML DOM emphasized object represents the HTML element in the Document Object Model. The element is used to emphasize text content, typically rendering it in italic style to indicate stress or importance. You can create and access emphasized objects using the createElement() and getElementById() methods respectively. Syntax Following is the syntax for creating an emphasized object − var emphasisElement = document.createElement("EM"); Following is the syntax for accessing an existing emphasized object − var emphasisElement = document.getElementById("elementId"); Properties The emphasized object inherits all standard HTML element properties ...
Read MoreHTML DOM Input Reset name property
The HTML DOM Input Reset name property is used for setting or returning the value of the name attribute of a reset button. The name attribute identifies form data when submitted to the server, allowing the server to distinguish between different form elements. Syntax Following is the syntax for setting the name property − resetObject.name = name Following is the syntax for getting the name property − var name = resetObject.name Parameters name − A string that specifies the name of the reset button. This value is used to ...
Read MoreHTML DOM Input Search autofocus Property
The HTML DOM Input Search autofocus property is associated with the HTML element's autofocus attribute. This property is used for setting or returning whether the input search field should automatically be focused when the page loads. Syntax Following is the syntax for setting the autofocus property − searchObject.autofocus = true|false Following is the syntax for returning the autofocus property − searchObject.autofocus Property Values The autofocus property accepts the following boolean values − true − The search field should get focus when the page loads. false − ...
Read MoreHTML DOM Input Search defaultValue Property
The HTML DOM Input Search defaultValue property is used for setting or getting the default value of a search field. The defaultValue of an element is the original value assigned to the value attribute when the page loads. The key difference between value and defaultValue properties is that defaultValue retains the original default value while value changes based on user input in the search field. Syntax Following is the syntax to get the defaultValue property − searchObject.defaultValue Following is the syntax to set the defaultValue property − searchObject.defaultValue = value ...
Read MoreHTML DOM Input Search form Property
The HTML DOM Input Search form property returns a reference to the form element that contains the input search field. If the search field is not inside any form, it returns null. This property is read-only and helps identify the parent form of a search input for validation or manipulation purposes. Syntax Following is the syntax for the input search form property − searchObject.form Return Value The form property returns − A form object reference if the input search field is inside a form element null if the input search field ...
Read MoreHTML DOM Input Search name Property
The HTML DOM Input Search name property sets or returns the value of the name attribute of a search input field. The name attribute identifies the form data when submitted to the server and allows JavaScript to reference the element for manipulation. Syntax Following is the syntax for setting the name property − searchObject.name = "name" Following is the syntax for getting the name property − var name = searchObject.name Here, name is a string specifying the name of the search field. Return Value The property returns a ...
Read More