Select items that do not contain a specific identifier using ExtJS

I am trying to select all <input>form elements except those that have identifiers containing the words fooor bar. How to do this using ExtJS 2.3.0? I tried the following:

Ext.query("select,input:not([id*=foo][id*=bar])", "SomeForm");`

... but it does not work. Excluding identifiers with fooin them seems to work fine:

Ext.query("select,input:not([id*=foo])", "SomeForm")`

I just don't know how to add a second substring of identifier. Any ideas?

+3
source share
3 answers

Not sure how to combine a selector like this, but I think that if you use the filter function, you can filter out the first query:

Ext.DomQuery.filter(Ext.query('input:not([id*=foo])','SomeForm'),'input:not([id*=bar])');

, :

Ext.query('input:not([id*=foo]):not([id*=bar])');

, :

Ext.query('input:not([id*=foo]):not([id*=bar])','SomeForm');

, ExtJS .

+3
Ext.query("select,input:not([id*=foo]):not([id*=bar])", "SomeForm")
+1

Ext.query("select,input:not([id*=foo]):not([id*=bar])", "SomeForm")` try it

+1
source

Source: https://habr.com/ru/post/1748209/


All Articles