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
HTML Articles
Page 101 of 151
HTML DOM Input DatetimeLocal required Property
The HTML DOM Input DatetimeLocal required property determines whether a datetime-local input field must be filled out before submitting a form. When set to true, the browser will prevent form submission if the field is empty and display a validation message. Syntax Following is the syntax for getting the required property value − inputDatetimeLocalObject.required Following is the syntax for setting the required property − inputDatetimeLocalObject.required = booleanValue Return Value The property returns a boolean value − true − The datetime-local field is required and must be filled ...
Read MoreHTML DOM Input Email autofocus Property
The HTML DOM Input Email autofocus property controls whether an email input field automatically receives focus when the page loads. This property corresponds to the HTML autofocus attribute and can be both read and modified using JavaScript. Syntax Following is the syntax for getting the autofocus property value − inputEmailObject.autofocus Following is the syntax for setting the autofocus property − inputEmailObject.autofocus = booleanValue Parameters The booleanValue parameter accepts the following values − Value Description true The email input field will be ...
Read MoreHTML DOM Input Email form Property
The HTML DOM Input Email form property is a read-only property that returns a reference to the form element that contains the input email field. This property provides access to the parent form element, allowing you to retrieve form attributes and manipulate form behavior through JavaScript. Syntax Following is the syntax for accessing the form property − inputEmailObject.form This property returns a reference to the HTMLFormElement object that contains the email input field. If the input field is not inside a form, it returns null. Return Value The form property returns − ...
Read MoreHTML DOM Input Email maxLength Property
The HTML DOM Input Email maxLength property controls the maximum number of characters allowed in an email input field. This property returns or sets the maximum character limit for user input and returns -1 if no limit is defined. Syntax Following is the syntax for returning the maxLength property − inputEmailObject.maxLength Following is the syntax for setting the maxLength property − inputEmailObject.maxLength = number Parameters The number parameter represents a positive integer specifying the maximum number of characters allowed in the email input field. Setting it to -1 removes ...
Read MoreHTML DOM Input Email Object
The HTML DOM Input Email Object represents an HTML element with type="email". This object provides properties and methods to interact with email input fields through JavaScript, allowing you to get, set, and manipulate email field attributes and values dynamically. Creating an Input Email Object You can create an Input Email Object in two ways − Using document.createElement() Following is the syntax to create an email input element dynamically − var emailObject = document.createElement("input"); emailObject.type = "email"; Using getElementById() Following is the syntax to access an existing email input element − ...
Read MoreHTML DOM Input Email pattern Property
The HTML DOM Input Email pattern property is used to set or return the value of the pattern attribute of an email input field. This property defines a regular expression that the email input value is checked against during form validation. Syntax Following is the syntax for getting the pattern value − inputEmailObject.pattern Following is the syntax for setting the pattern value − inputEmailObject.pattern = "RegExp" Parameters The pattern property accepts the following parameter − RegExp − A string containing a regular expression that defines the valid ...
Read MoreHTML DOM Input Email placeholder Property
The HTML DOM Input Email placeholder property sets or returns a string that provides hints to users about what kind of input is expected in an email field. The placeholder text appears in the input field when it is empty and disappears when the user starts typing. Syntax Following is the syntax for returning the placeholder value − inputEmailObject.placeholder Following is the syntax for setting the placeholder value − inputEmailObject.placeholder = stringValue Parameters stringValue − A string that specifies the placeholder text to be displayed in the email ...
Read MoreHTML DOM Input Email readOnly Property
The HTML DOM Input Email readOnly property sets or returns whether an email input field can be modified by the user. When set to true, the field becomes read-only and users cannot edit its content, though they can still select and copy the text. Syntax Following is the syntax for returning the readOnly property − inputEmailObject.readOnly Following is the syntax for setting the readOnly property − inputEmailObject.readOnly = booleanValue Parameters The booleanValue parameter accepts the following values − Value Description true ...
Read MoreHTML DOM Input Email size Property
The HTML DOM Input Email size property returns or sets the size attribute of an input email field. This property determines the visible width of the input field in characters. If not specified, the default value is 20. Syntax Following is the syntax for returning the size property − inputEmailObject.size Following is the syntax for setting the size property − inputEmailObject.size = number Parameters The size property accepts a numeric value representing the number of characters the input field should display. The value must be a positive integer. Common ...
Read MoreHTML DOM Superscript Object
The HTML DOM Superscript Object represents the element in an HTML document. The superscript element displays text as superscript, which appears half a character above the normal line and is often rendered in a smaller font size. This is commonly used for mathematical exponents, footnote references, and ordinal numbers. Syntax Following is the syntax to create a superscript object using JavaScript − document.createElement("SUP"); Properties The Superscript object inherits all properties from the generic HTMLElement object, including − innerHTML − Gets or sets the HTML content inside the superscript element. textContent ...
Read More