Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如果以下工作:
alert( data.query.results.tbody[1].tr[0].td[0].span.img.src );
为什么这不起作用?
var image = data.query.results.tbody[1].tr; alert( image[0].td[0].span.img.scr );
第二个警报给了我:
Undefined
将拼写修复scr为src:-)
scr
src
alert( image[0].td[0].span.img.src );