开发者

jQuery - how to get to the heavily nested element

开发者 https://www.devze.com 2023-02-04 21:51 出处:网络
I\'m trying to get value or change che开发者_Python百科cked attribute that lies here: html body div#container.user_view table tbody tr td#cright ul#all_charts_container li.chart_container div.header

I'm trying to get value or change che开发者_Python百科cked attribute that lies here:

html body div#container.user_view table tbody tr td#cright ul#all_charts_container li.chart_container div.header input#stat_view_1.checkbox

I'm having a trouble getting to it. Is there some easy way?

If I move this element to <body> then I can access it no problem.


$("input#stat_view_1.checkbox") that not the selector you want?


Since it has an id, just:

alert($("#stat_view_1").attr("checked"));

0

精彩评论

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