Use javascript to inject script references as needed?

后端 未结 6 846
终归单人心
终归单人心 2020-12-08 03:20

I have a JS function that may occasionally get used on some pages. It is dependent on another JS file (swfObject.js), but I\'d like to avoid having to include this file all

6条回答
  •  忘掉有多难
    2020-12-08 03:53

    None of these methods, including document.writing a script tag, work if the script itself has a document.write in it.

提交回复
热议问题