加载iframe视频javascript时避免页面刷新
我的网页上有一个滚动iframe视频部分。问题是在scroll中每次加载iframe时页面都会刷新。我使用了这个网站的滚动条加载iframe视频javascript时避免页面刷新,javascript,html,Javascript,Html,我的网页上有一个滚动iframe视频部分。问题是在scroll中每次加载iframe时页面都会刷新。我使用了这个网站的滚动条http://www.smoothdivscroll.com/index.html#toc。如何在加载iframe时避免页面刷新 Html: 每个iframe加载都没有刷新,至少据我所知没有。 我在HTML中看到的唯一问题是类似的ID属性(“test”),它与刷新无关,只是一些您也应该解决的问题 我已经用这个插件测试了你的代码,效果很好 <div id="logoPa
http://www.smoothdivscroll.com/index.html#toc
。如何在加载iframe时避免页面刷新
Html:
每个iframe加载都没有刷新,至少据我所知没有。 我在HTML中看到的唯一问题是类似的ID属性(“test”),它与刷新无关,只是一些您也应该解决的问题 我已经用这个插件测试了你的代码,效果很好
<div id="logoParade">
<div class="scrollWrapper">
<div class="scrollableArea">
<div class="product-box" id="test">
<iframe width="700" height="500" src="http://www.youtube.com/embed/QTKM-54zWm4" frameborder="0" allowfullscreen></iframe>
</div>
<div class="product-box" id="test">
<iframe width="700" height="500" src="http://www.youtube.com/embed/QTKM-54zWm4" frameborder="0" allowfullscreen></iframe>
</div>
<div class="product-box" id="test">
<iframe width="700" height="500" src="http://www.youtube.com/embed/QTKM-54zWm4" frameborder="0" allowfullscreen></iframe>
</div>
<div class="product-box" id="test">
<iframe width="700" height="500" src="http://www.youtube.com/embed/QTKM-54zWm4" frameborder="0" allowfullscreen></iframe>
</div>
<div class="product-box" id="test">
<iframe width="700" height="500" src="http://www.youtube.com/embed/QTKM-54zWm4" frameborder="0" allowfullscreen></iframe>
</div>
</div>
</div>
</div>