方法很简单,代码如下:

//增加PV方法
function addPv(){
var _hasp =/\#p\=/i.test(window.location.href);
if(!_hasp){
window.location.href = window.location.href+"#p=1";
}else{
window.location.href = window.location.href.split("#p=")[0] + "#p="+parseInt(count);
}
}
//注: count 为变量