If you want to dynamically load the js file, you can try the following:
Here is the HTML page code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <script type="text/javascript"> function dynamicLoad() { var s = document.createElement("script"); s.type="text/javascript"; s.language="javascript"; </script> </head> <body onload="dynamicLoad()"> </body> </html>
Here is the js file:
function test() { window.alert("HELLO"); }
I tested the code in IE 9. Just FYI
source share