问题:
Is there an easy way to get a tag name? 是否有一种简单的方法来获取标签名称?
For example, if I am given $('a')
into a function, I want to get 'a'
. 例如,如果给我$('a')
一个函数,我想得到'a'
。
解决方案:
参考一: https://stackoom.com/question/MR5h/jQuery-获取选定的元素标签名称参考二: https://oldbug.net/q/MR5h/jQuery-Get-selected-element-tag-name
来源:oschina
链接:https://my.oschina.net/u/4428122/blog/4366087