tailieunhanh - JavaScript Bible, Gold Edition part 65
JavaScript Bible, Gold Edition part 65. 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. | 488 Part III Document Objects Reference Even so these properties are now a part of the W3C DOM specification so they are implemented in NN6 as well. One property to take special note of is language. This property name conflicts slightly with the language property that is part of all HTML element objects. The preferred way to specify the language of the script statements inside the element is to set the TYPE attribute to a MIME type. Unfortunately this technique does not distinguish among versions of JavaScript. Also for backward compatibility I advise you to continue using the LANGUAGE attribute as well because only IE4 and NN6 recognize the TYPE attribute. Note Microsoft developer documentation states that the SCRIPT element object has an onLoad event handler. If that assertion is true then it is broken in IE4 and IE5. Properties defer Value Boolean Read Write NN2 NN3 NN4 NN6 IE3 J1 IE3 J2 IE4 IE5 Compatibility The default process of loading a page that contains scripts is to wait for any immediate script execution to complete before the rest of the page loads. But if you include a DEFER attribute in the tag modern browsers continue to load the rest of the page without waiting for immediate scripts to run. The defer property enables you to inspect or set that property its default value is false. Once a page loads any changes you make to an existing SCRIPT element s defer property has no effect. event htmlFor Value String Read-Only NN2 NN3 NN4 NN6 IE3 J1 IE3 J2 IE4 IE5 Compatibility Modern browsers enable you to bind events to script statements when you specify both a FOR and EVENT attribute in the SCRIPT tag. Statements inside the tag execute only when the object named by the FOR attribute receives the event named by the EVENT attribute. You can examine the EVENT attribute by way of the SCRIPT element object s event property and you can view the FOR attribute through the Chapter 20 HTML Directive Objects 489 htmlFor property. Both .
đang nạp các trang xem trước