HTML DOM
The placeholder property of the HTMLTextAreaElement interface represents a hint to the user of what can be entered in the control. It reflects the textarea element's placeholder attribute.
Value
A string.
Examples
const textareaElement = document.getElementById("comment");
console.log(textArea.placeholder);
Specifications
Browser compatibility
See also
- textarea
- HTMLTextAreaElement.value
来源:MDN Web Docs / Mozilla 贡献者 · 作者与贡献记录 · CC BY-SA 2.5。离线整理了版式、链接和媒体显示。
