更新时间:2023-02-26 12:05:18
你可以这样做:
$$("li:contains('whatever')").invoke("hide");
解释一下:$$("li:contains('whatever')")
返回一个包含whatever"的 列表,并且然后我们对该列表中的所有内容
调用
hide
方法.
To explain: $$("li:contains('whatever')")
returns a list of <li>
s that contain "whatever", and then we invoke
the hide
method on everything in that list.