解决方案 »

  1.   


      $(function(){
        $('img,a').each(function(){
          if(this.tagName=="A")this.href=this.href.replace(/^http:\/\/www.gravatar.com/i,'')
            else this.src=this.src.replace(/^http:\/\/www.gravatar.com/i,'')
        })
      })
      

  2.   

     $(function(){
        $('img,a').each(function(){
          if(this.tagName=="A")this.href=''
            else this.src=''
        })
      })
      

  3.   

    大致意思就是获取src或者href的属性值,然后像处理字符串一样,用replace方法将"http://www.gravatar.com"内容替换为空,基本实现方法1 楼已经给出。