HTMLTextAreaElement: placeholder property
MDN Web Docs · نسخهٔ df622a2a1c1e · CC BY-SA 2.5 و مجوز جداگانهٔ ناشر برای نمونهکد
{{ APIRef("HTML DOM") }}
The **placeholder** property of the {{DOMxRef("HTMLTextAreaElement")}} interface represents a hint to the user of what can be entered in the control. It reflects the {{htmlelement("textarea")}} element's [placeholder](/en-US/docs/Web/HTML/Reference/Elements/textarea#placeholder) attribute.
Value
A string.
Examples
js
const textareaElement = document.getElementById("comment");
console.log(textArea.placeholder);Specifications
{{Specifications}}
Browser compatibility
{{Compat}}
See also
- {{HTMLElement("textarea")}}
- {{DOMXref("HTMLTextAreaElement.value")}}