<body>
<p id="p1">
qwe
</p>
<button id="btn1">bbb1</button>
<button id="btn2">bbbb2</button>
</body>
<script type="text/javascript">
document.getElementById("btn1").onclick=function(){
document.getElementById("p1").innerText="123"
}
document.getElementById("btn2").onclick=function(){
window.location.reload();
}
</script>
更改过内容后,刷新还是修改后内容,除了微信都没这问题,除非关闭网页重新打开。用fidder看一下根本没有刷新。
有什么好的解决方式。
我目前方法是用location.href=''后面加上时间戳。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
目前是没办法解决
reload()方法的,因为微信引擎是不能使用这个方法的,目前多数是用的href链接认为点击location.reload();
我项目中使用这个方法没有问题啊,难道是兼容问题?
这个是可以解决的 使用 window.location.href="window.location.href+随机数" 解决
我是这样解决的
<p class="Page">
<ul class="PageUl">
</ul>
</p>
<script type="text/javascript">
</script>