Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

print placeholder value javascript

// Can be done by utilising  the getAttribute() Method.

var placeholder = document.getElementById("demo").getAttribute("placeholder");
console.log(placeholder);

// Ref: https://developer.mozilla.org/en-US/docs/Web/API/Element/getAttribute
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #print #placeholder #javascript
ADD COMMENT
Topic
Name
2+8 =