当前位置:Gxlcms > JavaScript > jQuery中filter(),not(),split()使用方法_jquery

jQuery中filter(),not(),split()使用方法_jquery

时间:2021-07-01 10:21:17 帮助过:6人阅读

filter()和not():
代码如下:

输出 hello
alert($("p").filter(".selected").html());
//输出 How are you?
alert($("p").not(".selected").html());
});



Hello

How are you?





split():
代码如下: