Posted By

caringprogrammer on 02/06/12


Tagged

javascript element html type


Versions (?)

Javascript checking HTML element type


 / Published in: JavaScript
 

URL: http://caringprogrammer.blogspot.com/

How to check Html element type

  1. var htmlElement = ...// html element
  2. var type = "input"; // type
  3. if(htmlElement.nodeName.toUpperCase() == type.toUpperCase())
  4. {
  5. //do something
  6. }

Report this snippet  

You need to login to post a comment.