HTML DOM Input Number placeholder Property

The HTML DOM input number placeholder property returns and modify the value of the placeholder attribute of number input field.

Syntax

Following is the syntax ?

  • Returning placeholder

object.placeholder
  • Modifying placeholder

object.placeholder = "text"

Example

Let us see an example of HTML DOM input number placeholder property ?






placeholder property Demo

Hi, Enter your age:

Output

This will produce the following output ?

Click on the "Change Placeholder" button to change the value of placeholder.

Updated on: 2026-03-11T22:50:44+05:30

269 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements