The information in this article applies to:
SYMPTOMSThe SRC attribute of the <SCRIPT> tag lets you specify a file as the JavaScript source, rather than embedding the JavaScript in the HTML. Here's an example:
This attribute is especially useful for sharing functions among many
different pages. Unfortunately, Internet Explorer 3.x does not support it.
STATUSInternet Explorer 4.x and 5 supports the SRC attribute of the <SCRIPT> tag. MORE INFORMATIONSteps to Reproduce Behavior
NOTE: External JavaScript files cannot contain any HTML tags; they must contain only JavaScript statements and function definitions. External JavaScript files should have the file name suffix .js, and the server must map the .js suffix to the MIME type "application/x-javascript," which the server sends back in the HTTP header. To map the suffix to the MIME type, add "application/x-javascript,js,5" to the server's Registry key HKEY_LOCAL_MACHINE/System/ControlSet001/Services/InetInfo/Parameter/MimeMap and then restart the server. If the server does not map the .js filename suffix to "application/x- javascript" MIME type, the browser will not load the JavaScript file specified by the SRC attribute properly. Additional query words:
Keywords : kbcode kbIE500 vbObjMdIIE |
Last Reviewed: August 9, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |