Input Text placeholder Attribute

Definition and Usage

placeholder Set or return the value of the placeholder attribute of the text field.

The HTML placeholder attribute specifies a short hint that describes the expected value of the text field (for example, a sample value or a brief description of the expected format).

A short prompt will be displayed in the text field before the user enters a value.

See also:

HTML Reference Manual:HTML <input> placeholder ਗੁਣ

Example

Example 1

Change the placeholder text of the text field:

document.getElementById("myText").placeholder = "Type name here..";

Try it yourself

Example 2

Get the placeholder text of the text field:

var x = document.getElementById("myText").placeholder;

Try it yourself

Syntax

Return placeholder property:

textObject.placeholder

set placeholder property:

textObject.placeholder = text

ਗੁਣ ਮੁੱਲ

ਮੁੱਲ ਵਿਆਖਿਆ
text ਪਾਠ ਫੀਲਡ ਦੀ ਅਕਾਲਮ ਮੁੱਲ ਦੇ ਸੰਕੇਤ ਵਾਲੀ ਵਿਆਖਿਆ ਦੇ ਨਿਰਦੇਸ਼

ਤਕਨੀਕੀ ਵੇਰਵੇ

ਵਾਪਸ ਮੁੱਲ: ਪਾਠ ਫੀਲਡ ਦੀ ਅਕਾਲਮ ਮੁੱਲ ਦੇ ਸੰਕੇਤ ਵਾਲੀ ਸਟਰਿੰਗ ਮੁੱਲ

ਬਰਾਉਜ਼ਰ ਸਮਰਥਨ

ਸਾਰੇ ਨੰਬਰ ਵਿੱਚ ਪਹਿਲੀ ਵਾਰ ਇਸ ਗੁਣ ਨੂੰ ਸਮਰਥਨ ਕਰਨ ਵਾਲੇ ਬਰਾਉਜ਼ਰ ਦੀ ਸੰਸਕਰਣ ਸੂਚੀ ਦਿੱਤੀ ਗਈ ਹੈ。

ਚਰਮੋਨੀ ਐਜ਼ ਫਾਇਰਫਾਕਸ ਸੈਫਾਰੀ ਓਪਰਾ
ਚਰਮੋਨੀ ਐਜ਼ ਫਾਇਰਫਾਕਸ ਸੈਫਾਰੀ ਓਪਰਾ
ਸਮਰਥਨ 10.0 ਸਮਰਥਨ ਸਮਰਥਨ ਸਮਰਥਨ