Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript log html element as dom object

var el = document.getElementById("myId"); 
console.log(el); // logs the html of element <div>…</div>
console.dir(el); // logs the element’s properties and values
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #javascript #log #html #element #dom #object
ADD COMMENT
Topic
Name
4+2 =