Answers for "javascript check type of element"

2

how to know type of dom element in js

let divElement = document.createElement('div');

if (divElement.nodeName == "DIV") //true
if (divElement.nodeName == "<div>") //false
Posted by: Guest on June-17-2020

Code answers related to "javascript check type of element"

Code answers related to "Javascript"

Browse Popular Code Answers by Language