ExtJS入門之三 查詢

2021-09-08 15:24:31 字數 673 閱讀 2106

在web開發中,對htmldom進行查詢是必不可少的,extjs提供了高效能的查詢功能,支援css3選擇器(selector)查詢和基本的xpath查詢。(extjs的查詢對xml和html均成立)

看下面的html**

<

divid="mydiv"

>

<

input

type="checkbox"

value="1"

/>

<

input

type="checkbox"

value="2"

/>

<

input

type="checkbox"

value="3"

/>

<

input

type="checkbox"

value="4"

/>

div>

如果要查出mydiv之下的所有的checkbox, 可以使用如下方法:

ext.get("mydiv").select("input[type=checkbox]")
對於具體的查詢引數, 可以參考ext的sdk中的ext.domquery類,這裡只說明ext提供了非常強大的查詢方法,可以對html或者xml進行元素選擇查詢,元素屬性查詢,css查詢等高階查詢。

ExtJS入門之三 查詢

在web開發中,對htmldom進行查詢是必不可少的,extjs提供了高效能的查詢功能,支援css3選擇器 selector 查詢和基本的xpath查詢。extjs的查詢對xml和html均成立 看下面的html divid mydiv input type checkbox value 1 inp...

lua入門之三module

1 模組與包23 定義乙個名為 module 的模組 4module 56 module.consta 這是乙個常量 7 8function module func1 9io.write func1共有函式 n 10end 1112 local function func2 13io.write f...

馮樂樂之三,SHADERLAB入門

shader lab 是shader language的抽象,只能在unity中使用.語義syntax是其基本結構,內的內容。shader shadername shader的名字以及在材質面板的顯示 cube cube cube white 3d 3d 3d black 最重要的模組,包含至少乙個...