无法设置未定义的属性"高度"

use*_*827 -2 html javascript

我试图通过从另一个获取来改变heighta ,但我得到了错误.divheightdivCannot set property 'height' of undefined

代码:

$("#loading_image_container").style.height = $('#content_frame').height();
Run Code Online (Sandbox Code Playgroud)

我确定content_frame的高度是500px.

Vuc*_*cko 5

尝试

$("#loading_image_container").height($('#content_frame').height());
Run Code Online (Sandbox Code Playgroud)