TAILIEUCHUNG - JavaScript Bible, Gold Edition part 34

JavaScript Bible, Gold Edition part 34. This book will bring programmers and non-technical professionals, including casual programmers and scripters, painlessly up to speed on all aspects of mastering JavaScript. Key topics include programming fundamentals, JavaScript language elements and how to use them effectively, and how to easily and efficiently add powerful new functionality to HTML documents and Java applets. | 178 Part III Document Objects Reference A primary scenario for IE mouse event capture is when some content appears on the page that you wish to leave as the center of user focus items such as pulldown menus context menus or simulated modal window areas. When such items appear on the screen you want the effect of blocking all mouse events except those that apply to the menu or currently visible pseudowindow. When the region disappears mouse events can be released so that individual elements such as buttons and links elsewhere on the page respond to mouse events. Event capture does not block the events. Instead the events are redirected to the object set to capture all mouse events. Events bubble up from that point unless explicitly cancelled see Chapter 29 . For example consider a document that has a BODY tag containing an onClick event handler that governs the entire document at all times. If you turn on event capture for a DIV somewhere in the document the click event first goes to the DIV. That DIV might have an onClick event handler that looks to process click events when they occur in some of its child elements. If the event handler for the DIV does not also cancel the bubbling of that click event the BODY element s onClick event handler eventually receives and processes the event even though the DIV initially captured the event. Deciding which object should capture events is an important design issue to confront. With event capture engaged all mouse events no matter where they occur get funneled to the object set to capture the events. Therefore if you design an application whose entire interface consists of clicking and dragging positionable elements you can set one of those elements or even the document object to perform the capturing. For pop-up regions however it is generally more logical and convenient for your coding to assign the capture mechanism to the primary container of the pop-up content usually a positioned DIV . The setCapture method has one .

TỪ KHÓA LIÊN QUAN
TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã 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.