HTML tutorial
CSS3 tutorial
Bootstrap tutorial
JavaScript tutorial
JQuery tutorial
AngularJS tutorial
React tutorial
NodeJS tutorial
PHP tutorial
Python tutorial
Python3 tutorial
Django tutorial
Linux tutorial
Docker tutorial
Ruby tutorial
Java tutorial
C tutorial
C ++ tutorial
Perl tutorial
JSP tutorial
Lua tutorial
Scala tutorial
Go tutorial
ASP.NET tutorial
C # tutorial
Input Email Object : Change the placeholder text of an email field
The placeholder property sets or returns the value of the placeholder attribute of an email field.
The placeholder attribute specifies a short hint that describes the expected value of an email field (e.g. a sample value or a short description of the expected format).
The short hint is displayed in the text field before the user enters a value.
Property | |||||
---|---|---|---|---|---|
placeholder | Yes | 10.0 | Yes | Yes | Yes |
Return the placeholder property:
Set the placeholder property:
Value | Description |
---|---|
text | Specifies a short hint (one word or a short phrase) that describes the expected value of the email field |
Return Value: | A String, representing a short hint that describes the expected value of the email field |
---|
Get the placeholder text of an email field:
var x = document.getElementById("myEmail").placeholder;
HTML reference: HTML <input> placeholder attribute
❮ Input Email Object