在微信浏览器里使用js或jquery实现页面重新刷新

function refresh() {
var random = Math.floor((Math.random() * 10000) + 1);
var url = decodeURI(window.location.href);
if (url.indexOf('?') < 0) {
url = url + "?random" + random;
} else {
url = url.substr(0, url.indexOf('?random')) + "?random" + random;
}
window.location.href = url;
}
---------------------
来源:CSDN
原文:https://blog.csdn.net/qq_25030259/article/details/80519633

posted @ 2019-05-01 10:23  闲云-野鹤  阅读(1400)  评论(0编辑  收藏  举报