ITeye博客

deal with href remove the same element

tsailer · 2011-05-11 09:38 · JS · Web前端 · HTML · J# · Markdown

var url="http://zhidao.baidu.com/question/193641504.html?name=tom&age=28"; function getName(url, name){ var firstarr = url.split("?"); var secarr = firstarr.split("&"); var thirdarr = ; for(var i=0; i<secarr.length; i++){ thirdarr* = secarr*.split("="); } for(var j=0; j<thirdarr.length; j++){ if(thirdarr==name){ return thirdarr; } } return false; } //var myvalue = getName(url,"name"); //document.write(myvalue); var duplicatedarr = ; function removeduplicateitem(arr){ for(var i=0; i<arr.length; i++){ for(var j=i+1; j<arr.length;j++){ if(arr*==arr){ //delete arr; arr.splice(j,1); } } } return arr; }

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。