苹果安卓移动端当前页面刷新一次

<script>
window.onload = function(){
var u = navigator.userAgent;
var isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);
if(isiOS){
if(location.search.indexOf("?")==-1){
location.href += "?myurl";
}
else{
if(location.search.indexOf("myurl")==-1) location.href += "&myurl";
}
}
}
</script>

posted @ 2017-12-23 09:41  璁璁那~年  阅读(241)  评论(0编辑  收藏  举报