扫码关注官方订阅号
qwe bbb1 bbbb2
qwe
更改过内容后,刷新还是修改后内容,除了微信都没这问题,除非关闭网页重新打开。用fidder看一下根本没有刷新。有什么好的解决方式。
我目前方法是用location.href=''后面加上时间戳。
闭关修行中......
目前是没办法解决reload()方法的,因为微信引擎是不能使用这个方法的,目前多数是用的href链接认为点击
reload()
location.reload();我项目中使用这个方法没有问题啊,难道是兼容问题?
这个是可以解决的 使用 window.location.href="window.location.href+随机数" 解决 我是这样解决的 <p class="Page"> <ul class="PageUl">
<li class="PageLi"> <a onclick='aa()' style='text-decoration:underline;color:#00d'>◀返回</a> </li>
</ul></p><script type="text/javascript">
function aa(){ var curLocation = window.location.href; var number = Math.round(Math.random()*100); if(curLocation.indexOf('CorpEMpCheck?') > -1){ window.location.href = curLocation.substring(0,curLocation.length-3) + '?'+number; }else{ window.location.href = curLocation + '?'+number; } }
</script>
微信扫码关注PHP中文网服务号
QQ扫码加入技术交流群
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
PHP学习
技术支持
返回顶部
目前是没办法解决
reload()方法的,因为微信引擎是不能使用这个方法的,目前多数是用的href链接认为点击location.reload();
我项目中使用这个方法没有问题啊,难道是兼容问题?
这个是可以解决的 使用 window.location.href="window.location.href+随机数" 解决
我是这样解决的
<p class="Page">
<ul class="PageUl">
</ul>
</p>
<script type="text/javascript">
</script>