可以用execScript方法.
execScript Method--------------------------------------------------------------------------------Executes the specified script in the provided language.SyntaxvReturn = window.execScript(sExpression, sLanguage)
ParameterssExpression Required. String that specifies the code to be executed.
sLanguage Required. String that specifies the language in which the code is executed. The language defaults to Microsoft® JScript®. Return ValueThis method always returns null.
execScript Method--------------------------------------------------------------------------------Executes the specified script in the provided language.SyntaxvReturn = window.execScript(sExpression, sLanguage)
ParameterssExpression Required. String that specifies the code to be executed.
sLanguage Required. String that specifies the language in which the code is executed. The language defaults to Microsoft® JScript®. Return ValueThis method always returns null.
file1.js:document.write("<scr"+"ipt src='file2.js'></scr"+"ipt>");