node节点

 if (node.text.indexOf(q) !=-1)  //判断q是否存在节点名称中给字段

indexOf  //字符串是否存在另外一个字符串中  

strs.indexOf(str)=-1  即不存在//输出第几个位置

判断是否存在字符

strs.test(str)   //true   存在字符

$(node.target).show();  //显示节点

$(node.target).hide();  //隐藏节点

                    

猜你喜欢

转载自blog.csdn.net/qq_24422109/article/details/82967068