Answers for "how to know type of dom element in js"

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 "how to know type of dom element in js"

Code answers related to "Javascript"

Browse Popular Code Answers by Language