Home > Web Front-end > JS Tutorial > jquery uses $(element).is() to determine the obtained tagName_jquery

jquery uses $(element).is() to determine the obtained tagName_jquery

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-05-16 16:38:41
Original
1297 people have browsed it

If you want to get the tagName and then make a judgment, you can use jquery $(element).is() to achieve it.

If you want to get the tagName and then make a judgment, it will be more convenient to use the following code directly:

$(element).is('input')
Copy after login

If you want to get the tag and use it elsewhere, you can use the code:

$(element)[0].tagName
或:
$(element).get(0).tagName
Copy after login
Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template