繁体   English   中英

JavaScript仅在刷新页面多次后才能工作

[英]JavaScript only working after Refreshing Page multiple times

仅当我多次刷新页面时,我的JavaScript才能开始工作。

请检查以下代码-

<div class="col-xs-6 col-sm-3  js--isotope-target  js--cat-2" data-price="14.36" data-rating="4">
  <div class="products__single">
<figure class="products__image">
  <a href="single-product.html">
    <img alt="#" class="product__image" width="263" height="334" src="images/dummy/w263/2.jpg">
  </a>
  <div class="product-overlay">
    <a class="product-overlay__more" href="single-product.html">
      <span class="glyphicon glyphicon-search"></span>
    </a>

    <div class="product-overlay__stock">
      <span class="in-stock">&bull;</span> <span class="in-stock--text">In stock</span>
    </div>
  </div>
</figure>
<div class="row">
  <div class="col-xs-9">
    <h5 class="products__title">
      <a class="products__link  js--isotope-title" href="single-product.html">Moringa Powder</a>
    </h5>
     </div>
    </div>
    <div class="products__category">
  Powders
    </div>
   </div>
  </div>

我曾尝试重置浏览器Javacript(禁用然后再次启用它),但没有任何效果,在页面首次加载后JavaScript永远无法工作,我必须始终刷新页面多次才能使javascript工作!

将ver添加到您的JavaScript文件。 像这样。 myjava.js到myjava.js?v = 1.0

每次更改版本。 .js文件中是否有任何更改。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM