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.
我在这个站点上使用了几个脚本库,例如 Amcharts。我注意到有时它们无法正确加载,并且可能没有表格或图表。我试图将它们放在页眉和页脚中,但这并没有改变任何东西。有没有办法让它正确?
head您的 html中有以下代码段:
head
<script type="text/javascript"> jQuery(window).on('load', function() { new JCaption('img.caption'); }); </script>
但是 jQuery 本身是在 body 的末尾加载的,这导致它中断。在此代码段之前的头部加载 jQuery。或者在 jQuery 加载后将此代码段放在正文的末尾。