日期:2014-05-16 浏览次数:20480 次
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>无标题页</title>
<script type="text/javascript">
String.prototype.queryString= function(name) {
var reg=new RegExp("[\?\&]" + name+ "=([^\&]+)","i"),r = this.match(reg);
return r!==null?unescape(r[1]):null;
};
window.onload=function(){
var last=location.href.queryString("_v");
document.body.innerHTML+=last
------解决方案--------------------
"";
if(location.href.indexOf("?")==-1){
location.href=location.href+"?_v="+(new Date().getTime());
}else{
var now=new Date().getTime();
if(!last){
location.href=location.href+"&_v="+(new Date().getTime());
}else if(parseInt(last)<(now-1000)){
location.href=location.href.replace("_v="+last,"_v="+(new Date().getTime()));
}
}
};
</script></head>
<body>
</body>
</html>