代码:
$(function(){ $('div.left ul li a').each(function(){ if($($(this))[0].href==String(window.location)) $(this).parent().addClass('cur_li'); });