给所有ajax请求增加随机数

var origionAjax=$.ajax
$.ajax=function(obj){
  obj.url=(obj.url).indexOf("?")>-1?(obj.url+"&randomABC="+Math.round(Math.random()*(+new Date()))):(obj.url+"?randomABC="+Math.round(Math.random()*(+new Date())))
  origionAjax(obj)
}

原文地址:https://www.cnblogs.com/liuhao-web/p/9578374.html