本帖最后由 mingfish 于 2009-07-30 14:33:04 编辑

解决方案 »

  1.   


    $(document).ready(function(){
      var oNotes =$("#test").get(0).childNodes;
      $(oNotes).each(function(){
        if(this.nodeType == 3){
          var oSpan = document.createElement("span");
          $(this).wrap(oSpan);
        }
      });
    });
      

  2.   


    $(document).ready(function(){
      var oNotes =$("#test").get(0).childNodes;
      $(oNotes).each(function(){
        if(this.nodeType == 3){
          var oSpan = document.createElement("span");
          $(this).wrap(oSpan);
        }
      });
    });