Thật không may, tiêu chuẩn HTML chỉ cung cấp một tập hợp nhỏ các tùy chọn để hiển thị dữ liệu. Dojo mở rộng khả năng của chúng tôi bằng cách cung cấp một tập hợp mạnh mẽ của các yếu tố thị giác, gọi là widget, trong đó cung cấp cho chúng tôi một bảng màu phong phú hơn nhiều để lựa chọn để đưa | 84 Chapter 6 Introduction to Dojo Widgets Table Continued Description ComboButton This widget combines a regular Button widget with a DropDownButton widget hence the name ComboButton. The leftmost example shows the widget before the down arrow is selected. The rightmost example shows the widget after the down arrow icon has been checked. The user can click either on the down arrow icon or on the button itself. Example ToggleButton This button looks the same as a regular Button but behaves differently. When the button is clicked the button CSS as well as the icon CSS can change. CheckBox This replaces the standard HTML checkbox. It looks nicer and has a better check icon. RadioButton This replaces the standard HTML checkbox. The advantages are a nicer look and a better checked icon. ự Checked Q Unchecked 0 Checked and Disabled Filteringselect This widget is an enhanced version of the HTML select tag. One improvement is that when text is typed in the field it will be used to filter possible values from the full list of data. In this example typing i causes the widget to only display states that begin with I. The data list could be static provided in the HTML page or could be acquired from the server using Ajax. Components of a Dojo Widget 85 Table Continued Description Example NumberSpinner This is really just a text box for entering numbers but with a special feature Up and down arrow keys can be used to increase or decrease the value instead of the person having to type it directly. Slider This widget is also a replacement for a simple numeric text value but instead of entering the number directly you drag an icon the slider across a bar of values. The value for the widget is determined by the position of the slider on the bar. Spinner 900 w Textarea This widget is a replacement for the standard HTML textarea tag. The primary additional feature of this widget is that it grows vertically instead of scrolls vertically. As you type the size of the box .