$(function(){ var type = getquerystring("classify2"); if(type !=null && type.tostring().length>=1){ $('.fenlei').find('a').each(function(index){ var t = $(this).attr('data-t'); if(type==t){ $('.fenlei').find('a').removeclass("choose_it"); $(this).addclass("choose_it"); } }) } }) //��ȡurl�ij��� function getquerystring(name){ var reg = new regexp("(^|&)"+ name +"=([^&]*)(&|$)"); var r = window.location.search.substr(1).match(reg); if(r!=null) return decodeuri(r[2]); return null; }