How to get text inside of container that is not part of children

后端 未结 3 1135

Let\'s have html code like this:

1.Hallo Kitty,
How are you?
<
3条回答
  •  悲&欢浪女
    2021-01-06 06:28

    http://jsfiddle.net/SGZW4/

    var text = $("#d1").contents().filter( function() {
        return this.nodeType === 3;
    }).text();
    

提交回复
热议问题