Jquery USES $of element.is of to determine the acquired tagName
- 2020-03-30 03:46:47
- OfStack
If the purpose is to get the tagName and then judge, it is more convenient to directly use the following code:
$(element).is('input')
If you want to get the tag to use elsewhere, you can use the code:
$(element)[0].tagName
Or:
$(element).get(0).tagName