【正文】
change with pageup/pagedown shift+arrowshowButtonsbooleantrueShow increment/decrement buttons at the ends of the slider?MethodssetValue((/*Number*/ value, /*Boolean, optional*/ priorityChange)Regular setValue, but if priorityChange is true, then it is more likely to be animated., Create hash marks for the Horizontal/Vertical sliderAttributescontainerNodecontainerNodeIf this is a child widget, connect it to this parent nodecountInteger3Number of hash marks to generateruleStyleStringCSS style to apply to individual hash marks, Create labels for the SliderAttributeslabelsArray[]Array of text labels to render evenly spaced from lefttoright or bottomtotoplabelStyleStringCSS style to apply to individual text labels文本框: Validation, Currency, Number, Date, Time頁框(TabContainer)頁框是多個(gè)頁面,但同時(shí)只能顯示一個(gè)。有一系列的頁框頭和可選的關(guān)閉按鈕。例子:!DOCTYPE HTML PUBLIC //W3C//DTD HTML htmlheadmeta equiv=ContentType content=text/html。 charset=UTF8titleTabContainer Demo/title style type=text/css @import 。 @import /style script type=text/javascript src= djConfig=parseOnLoad: true/script script type=text/javascript ()。 ()。 ()。 ()。 /script/headbody class=tundra div id=mainTabContainer dojoType= style=width:500px。height:100px div id=LittleRed dojoType= title=Little Red Cap Once upon a time there was a dear little girl who was loved by every one who looked at her, but most of all by her grandmother, and there was nothing that she would not have given to the child. /div div id=HanselGretel dojoType= title=Hansel and Gretel closable=true selected=true Hard by a great forest dwelt a poor woodcutter with his wife and his two children. The boy was called Hansel and the girl Gretel. He had little to bite and to break, and once when great dearth fell on the land, he could no longer procure even daily bread. /div div id=GreenTwigs dojoType= title=The Three Green Twigs There was once upon a time a hermit who lived in a forest at the foot of a mountain, and passed his time in prayer and good works, and every evening he carried, to the glory of God, two pails of water up the mountain. /div/div/body/html屬性tabPositionString設(shè)置頁框頭的位置: top, bottom, lefth, righth 方法addChild(/*Widget*/ child, /*Integer?*/ insertIndex)增加節(jié)點(diǎn)back()closeChild(/*Widget*/ page)關(guān)閉子頁forward()Widget[] getChildren()返回子部件數(shù)組Widget getNextSibling()返回下一個(gè)組件Widget getParent()返回父組件Widget getPreviousSibling()返回上一個(gè)組件Boolean hasChildren()判斷是否有子組件removeChild(/*Widget*/ page)移除子組件resize(/* Object */ args)改變大小。參數(shù)為 form {w: int, h: int, l: int, t: int}.selectChild(/*Widget*/ page)顯示子組件網(wǎng)格Grid (),這個(gè)小部件這只是個(gè)測試版。簡單的網(wǎng)格基礎(chǔ)使用網(wǎng)格的每個(gè)頁面都必須導(dǎo)入表格風(fēng)格單。當(dāng)與Dojo和Dijit共同使用的時(shí)候,你使用的表單方式和下面類似:style type=text/css /* matches Dijit Tundra style. Others forthing. Use on the same path for a more colorneutral theme */ @import 。 @import 。 @import /style模型每個(gè)網(wǎng)格都是以數(shù)據(jù)開始,有兩個(gè)DIV標(biāo)簽定義我們的數(shù)據(jù)源。由于相同的安全規(guī)則,你需要將數(shù)據(jù)文件放在服務(wù)器上,你可以下載這個(gè)文件:,把它放在下面例子中指定的目錄中。div dojoType= jsId=jsonStore url= /div div dojoType= jsId=model rowsPerPage=20 store=jsonStore query={ namespace: 39。*39。 } /div第一個(gè)DIV標(biāo)簽看起來很面熟,是列表。你首先要對dojit組件ComboBox或Tree數(shù)據(jù)進(jìn)行定義,。模型對選定的數(shù)據(jù)都有選項(xiàng)。在這個(gè)例子里,我們把模型中的數(shù)據(jù)源jsonStore稱為模型(model)。模型也可以通過js數(shù)組創(chuàng)建,請參考模型選項(xiàng)(后面將專列一章講述)。視圖在標(biāo)準(zhǔn)的表格中,單元格(cell)是最基本的展示數(shù)據(jù)的單元。行(row)是一系列水平的單元格,列(column)是垂直的一系列單元格。在網(wǎng)格區(qū)域,有行(row)和子行(subrow)的區(qū)別。對于子行,人們通常會(huì)認(rèn)為是一個(gè)行。它確實(shí)是一個(gè)單元格高。在網(wǎng)格中,行可以有多個(gè)子行但它是可以選擇的單元。所以,你要注意一下demo中的網(wǎng)格中邏輯行(譯者注:指顯示數(shù)據(jù)的行)有兩個(gè)子行高。視圖是一組連續(xù)的邏輯行,有相同的內(nèi)容和外形。在上面的例子中,每個(gè)邏輯行都是兩個(gè)子行高,在最頂部的一行有兩列,在最底部的一行有一列(最后一個(gè)單元格分成了兩列)。你必須在JS中用一個(gè)個(gè)的數(shù)組分別定義。每個(gè)數(shù)組元素都是一個(gè)對象。最重要的屬性是對象的name,指定相應(yīng)的列。列名總是顯示在網(wǎng)格頂部,不像其它行,它是不能被滾動(dòng)條滾動(dòng)的。// 視圖var view1 = { cells: [[ {name: 39。Namespace39。, field: namespace}, {name: 39。Class39。, width: 25em, field: className} ], [ {name: 39。Summary39。, colSpan:2, field: summary} ] ]}。模型中的字段應(yīng)用到每一個(gè)單元格。屬性被忽略了。在我們上面的例子里,namespace沒有字段,class有一個(gè)字段,等等。和htmL表格的OL一樣,你可定義:colSpan(注意S大寫)、rowSpan、width.結(jié)構(gòu)最后,視圖可以組織在一起,成為一個(gè)結(jié)構(gòu)。、底部、左側(cè)或右側(cè),或者是中間。我們的例子只有一個(gè)view:var layout = [ view1 ]。部件模型和結(jié)構(gòu)(由多個(gè)視圖組成)一起構(gòu)成網(wǎng)格組件:div id=grid dojoType= model=model structure=layout/div這個(gè)模型和結(jié)構(gòu)的屬性指向JS變量,這樣網(wǎng)格就生成了。這個(gè)網(wǎng)格是可滾動(dòng)的、大小可變的、行也是可選擇的。下面是完整的程序代碼:!DOCTYPE HTML PUBLIC //W3C//DTD HTML Transitional//EN htmlhead titleTest Basic/title meta equiv=ContentType content=text/html。 charset=utf8/meta style type=text/css @import 。 @import 。 @import body { fontsize: 。 fontfamily: Geneva, Arial, Helvetica, sansserif。 } .heading { fontweight: bold。 paddingbottom: 。 } grid { border: 1px solid 333。 width: 35em。 height: 30em。 } /style script type=text/javascript src= djConfig=isDebug:false, parseOnLoad: true/script script type=text/javascript ()。 ()。 ()。 ()。 // a grid view is a group of columns. var view1 = { cells: [[ {name: 39。Namespace39。, field: namespace}, {name: 39。Class39。, width: 25em, field: className} ], [ {name: 39。Summary39。, colSpan:2, field: summary} ]