色婷婷狠狠18禁久久YY,CHINESE性内射高清国产,国产女人18毛片水真多1,国产AV在线观看

編碼表單數據時為什么要將“%20”替換為“+”?

錢良釵2年前16瀏覽0評論
functionencodeFormData(data){if(!data)return"";varpairs=[];for(varnameindata){if(!data.hasOwnProperty(name))continue;if(typeofdata[name]==="function")continue;varvalue=data[name].toString();name=encodeURIComponent(name.replace("%20","+"))value=encodeURIComponent(value.replace("%20","+"))pairs.push(name+"="+value);}returnparis.join('&')}functiongetData(url,data,callback){varrequest=newXMLHttpRequest()request.open("GET",url+"?"+encodeFormData(data))request.onreadystatechange=function(){if(request.readyState===4&&callback)callback(request)}request.send(null);}