Javascript external script loading strangeness

后端 未结 4 950
灰色年华
灰色年华 2021-01-16 20:07

I\'m maintaining a legacy javascript application which has its components split into 4 JS files.

They are \"Default.aspx\", \"set1.aspx\", \"set2.aspx\" and \"set3.a

4条回答
  •  无人及你
    2021-01-16 21:03

    1) Assure that you do not try to reference MyApp before the script is "actually" included in your page.

    2) Try breaking the word "script" in your inline loader like this:

    
    

    Alternatively, use this syntax which i borrowed from google analytics code and have been able to use successfully:

    
    

提交回复
热议问题