jquery如何去除表中重复的数据
1个回答
展开全部
arams = url.split("?");
newUrl="";
pa = params[1].split("&");
var repeatParam = new Array();
var allParam = new Array();
f=0;
re:
for(var a=0;a<pa.length;a++){
for(var b=0;b<pa.length;b++){
if(allParam[b]==pa[a]){
continue re;
}
}
if(f<pa.length){
allParam[f]=pa[a];
newUrl+=pa[a]+"&";
f++;
}
}
newUrl="";
pa = params[1].split("&");
var repeatParam = new Array();
var allParam = new Array();
f=0;
re:
for(var a=0;a<pa.length;a++){
for(var b=0;b<pa.length;b++){
if(allParam[b]==pa[a]){
continue re;
}
}
if(f<pa.length){
allParam[f]=pa[a];
newUrl+=pa[a]+"&";
f++;
}
}
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询