【发布时间】:2017-04-07 17:30:07
【问题描述】:
有谁知道为什么这里的高度可能为零?
$(document).ready(function () {
alert($("#hello").height());
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<img id="hello" class="browseIMG" src="https://udemy-images.udemy.com/course/750x422/64132_926c_10.jpg" />
【问题讨论】:
-
它给了我 422 警报...
-
我已将代码放入 sn-p - 但具有讽刺意味的是,代码现在可以工作了。
标签: javascript html height