Dojo Using the Dojo JavaScript Library to Build Ajax Applications phần 5

Các nhà phát triển Web đang tìm kiếm cách để áp dụng các kỹ thuật Ajax đến các trang web của họ. Nhưng những gì chính xác là Ajax? Các từ viết tắt được vốn hóa như AJAX và đứng cho Asynchronous JavaScript và XML. Tuy nhiên, ý nghĩa đã phát triển qua thời gian. Hãy để tôi cho bạn một nhiều hơn hiện tại | The Dojo Form Widget Explained 117 Key Method Description Methods isInRange This function returns true if the value of the widget is in range and false otherwise. It runs the rangecheck function. compare value1 This function returns one of three values value2 depending on the relative values of value1 and value2. Returns 0 if value1 and value2 are equal. Returns a negative number if value2 is greater than value1. Returns a positive number if value1 is greater than value2. Key Styles None Key Events None Notes None 118 Chapter 7 Dojo Form Widgets Widget Name Super Classes J j j j File Location dijit form Use Usage This class creates a widget that subclasses RangeBoundTextBox and allows only numeric values. By inheriting all of the functionality from its super classes this widget provides a powerful set of features to provide for the entry of numeric data. It doesn t possess any of its own new methods or properties but overrides a number of inherited methods to provide some useful numeric validations. Display Examples This figure shows the rangeMessage Tooltip when the entered data is outside the valid range. Notice also that the field is highlighted and there is a special warning message icon at the far right of the field. HTML Markup Examples Following is the HTML for creating a simple NumberTextBox with a range validation. inputtype text name age dojoType promptMessage Enter an age rangeMessage Enter an age between 18 and 120 constraints min 18 max 120 required true Notice that the constraints attribute specifies a value within braces This is JSON notation for building an object. The Dojo Form Widget Explained 119 JavaScript Constructor Examples Create a NumberTextBox widget using JavaScript. var obj name temperature

Không thể tạo bản xem trước, hãy bấm tải xuống
TÀI LIỆU MỚI ĐĂNG
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.