$('#'+street)[0].className="current"; //一定要加[0], 或者使用下面的形式
  $('#'+street).addClass("current");

参考:

 $('a[id*="street"]').click(function() {
  
  $('input[name="current_street"]').val(this.id);
  $('a[id*="street"]').removeClass('current');
        this.className="current";
       
        $('a[id*="distinct"]').removeClass('current');
        $('input[name="current_distinct"]').val("");
  
 });

posted on 2011-05-30 11:15  佐伊凡  阅读(6938)  评论(0编辑  收藏  举报