Using external javascript files in a .js file

前端 未结 5 839
梦毁少年i
梦毁少年i 2020-12-03 01:45

I would like to use an external javascript file in another javascript file. For example, I could store all my global variables in a globals.js file and then call then from t

5条回答
  •  失恋的感觉
    2020-12-03 01:57

    You can also do something like this:

    $(document).ready(function(){
        $('body').append($(''));
    });
    

    Just use that line before you need to reference something in the included js file.

提交回复
热议问题