📌  相关文章
📜  what $this.attr('id') - 任何代码示例

📅  最后修改于: 2022-03-11 14:59:35.849000             🧑  作者: Mango

代码示例1
No, they're not exactly the same.
They'll both return the element's ID, but if the element has no ID, then this.id will return a blank string while $(this).attr("id") will return undefined.