方案一:页面中设置:
<div style="display: none;">
<script src="${ctxPath}/static/assets/js/cnzzbody.js" type="text/javascript"></script>
<script src="${ctxPath}/static/assets/js/cnzzheader.js" type="text/javascript"></script>
</div>
方案二:js中设置:
var cnzz_protocol = (("https:" == document.location.protocol) ? " https://"
: " http://");
document
.write(unescape("%3Cspan style='display:none' id='cnzz_stat_icon_'%3E%3C/span%3E%3Cscript style='display:none' src='"
+ cnzz_protocol
+ "s23.cnzz.com/z_stat.php%3Fid%%26show%3Dpic' type='text/javascript'%3E%3C/script%3E"));
相对来说,推荐方案二,一劳永逸。
————————————————
版权声明:本文为CSDN博主「小迟丶」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/qq_31362105/article/details/84658565