Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/376.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
wordpress 4.1 javascript停止工作_Javascript - Fatal编程技术网

wordpress 4.1 javascript停止工作

wordpress 4.1 javascript停止工作,javascript,Javascript,我有一个使用javascript的横幅图像旋转器,它在wp 4.1更新后停止工作 <script type="text/javascript"> var imgs2 = new Array("http://www.chinasurfreport.com/wp-content/uploads/2014/09/LRG-BANNER.jpg","http://www.chinasurfreport.com/wp-content/uploads/2014/10/thehundreds2.jp

我有一个使用javascript的横幅图像旋转器,它在wp 4.1更新后停止工作

<script type="text/javascript">
var imgs2 = new Array("http://www.chinasurfreport.com/wp-content/uploads/2014/09/LRG-BANNER.jpg","http://www.chinasurfreport.com/wp-content/uploads/2014/10/thehundreds2.jpg");
var lnks2 = new Array("http://www.bluehawaiisurf.com.cn/","http://www.bluehawaiisurf.com.cn/");
var alt2 = new Array("lrg-banner","the-hundreds-banner");
var currentAd2 = 0;
var imgCt2 = 2;
function cycle2() {
  if (currentAd2 == imgCt2) {
    currentAd2 = 0;
  }
var banner2 = document.getElementById('adBanner2');
var link2 = document.getElementById('adLink2');
  banner2.src=imgs2[currentAd2]
  banner2.alt=alt2[currentAd2]
  document.getElementById('adLink2').href=lnks2[currentAd2]
  currentAd2++;
}
  window.setInterval("cycle2()",20000);
</script>
<a href="http://www.bluehawaiisurf.com.cn/" id="adLink2" target="_blank">
<img src="http://www.chinasurfreport.com/wp-content/uploads/2014/09/LRG-BANNER.jpg" id="adBanner2" border="0" width="325" height="724"></a>

我不能改变这一点。我在期待一场冲突?

哈哈,血淋淋地安装了一个新的chrome扩展插件adblock plus,将其删除。啊

script {
display: none;
}