JavaScript Bible, Gold Edition part 174

JavaScript Bible, Gold Edition part 174. 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. | CD-222 Part VI Appendixes onBeforeCopy event handler to onBeforeCut. Notice that in its original form the example does not activate the Cut item in either the context or Edit menu when you select some text in the second paragraph. But by assigning a function to the onBeforeCut event handler the menu item is active and the entire paragraph is selected from the function that is invoked. onBeforeDeactivate See onActivate. onBeforeEditFocus NN2 NN3 NN4 NN6 IE3 J1 IE3 J2 IE4 IE5 Compatibility Example Use The Evaluator to explore the onBeforeEditFocus in . In the following sequence you assign an anonymous function to the onBeforeEditFocus event handler of the myP element. The function turns the text color of the element to red when the event handler fires new Function red Now turn on content editing for the myP element true If you now click inside the myP element on the page to edit its content the text turns to red before you begin editing. In a page scripted for this kind of user interface you would include some control that turns off editing and changes the color to normal. If you wish to learn more about HTML content editing via the DHTML Editing ActiveX control visit http workshop browser mshtml . e emenfOb Appendix F Examples from Parts III and IV CD-223 onBeforePaste NN2 NN3 NN4 NN6 IE3 J1 IE3 J2 IE4 IE5 Compatibility Example See Listing 15-45 for the onPaste event handler later in this chapter to see how the onBeforePaste and onPaste event handlers work together. onBlur NN2 NN3 NN4 NN6 IE3 J1 IE3 J2 IE4 IE5 Compatibility Example More often than not a page author uses the onBlur event handler to exert extreme control over the user such as preventing a user from exiting out of a text box unless that user types something into the box. This is not a Web-friendly practice and it is one that I discourage because there are intelligent ways to ensure

Không thể tạo bản xem trước, hãy bấm tải xuống
TỪ KHÓA LIÊN QUAN
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.