开发者

Display the Element ID

开发者 https://www.devze.com 2022-12-31 19:10 出处:网络
I am using this statement alert(el.parent().next()); But I am getting [object] [object] as an alert. How do I displa开发者_如何学运维y the ID of the element?Have you tried?

I am using this statement alert(el.parent().next());

But I am getting [object] [object] as an alert. How do I displa开发者_如何学运维y the ID of the element?


Have you tried?

alert(el.parent().next().attr("id"));


You must get its id attribute:

alert(el.parent().next().attr("id"));


el.parent().next().attr("id")
0

精彩评论

暂无评论...
验证码 换一张
取 消