tailieunhanh - JavaScript Bible 5th Edition 2004 phần 7

văn bản, mật khẩu, và các đối tượng ẩn yếu tố đầu vào, cộng với các đối tượng phần tử textarea. Tất cả bốn người trong số các đối tượng này được sử dụng cho nhập cảnh, hiển thị, hoặc lưu trữ tạm thời dữ liệu văn bản. Trong khi tất cả các đối tượng này có thể có văn bản được đặt trong họ theo mặc định khi tải trang, kịch bản | Chapter 34 Global Functions and Statements 1021 VBArray Method Description Items Keys Remove key RemoveAll Returns VBArray of values in dictionary Returns VBArray of keys in dictionary Removes key and its value Removes all entries Enumerator An Enumerator object provides JavaScript with access to collections that otherwise do not allow direct access to their items via index number or name. This object isn t necessary when working with DOM collections such as because you can use the i tem method to obtain a reference to any member of the collection. But if you are scripting ActiveX objects some of these objects methods or properties may return collections that cannot be accessed through this mechanism or the JavaScript for-in property inspection technique. Instead you must wrap the collection inside an Enumerator object. To wrap a collection in an Enumerator invoke the constructor for the object passing the collection as the parameter var myEnum new Enumerator someCo ect or This enumerator instance must be accessed via one of its four methods to position a pointer to a particular item and then extract a copy of that item. In other words you don t access a member directly that is by diving into the collection with an item number to retrieve . Instead you move the pointer to the desired position and then read the item value. As you can see from the list of methods in Table 34-3 this object is truly intended for looping through the collection. Pointer control is limited to positioning it at the start of the collection and incrementing its position along the collection by one for val more statements that work on value Table 34-3 Enumerator Object Methods Method Description atEnd Returns true if pointer is at end of collection item Returns value at current pointer position moveFirst Moves pointer to first position in collection moveNext Moves pointer to next position in collection VBArray The VBArray

TỪ KHÓA LIÊN QUAN
TÀI LIỆU MỚI ĐĂNG
31    261    0    14-05-2024
10    165    0    14-05-2024
23    162    0    14-05-2024
1    121    1    14-05-2024
2    115    0    14-05-2024
165    91    0    14-05-2024
crossorigin="anonymous">
Đã 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.