Hello! As you know, the <script> in javascript files does not work. In PHP, HTML files javascript connection of the code occurs exactly in the <script src="~"> . But how to connect to another js-file js-file? Thank!

    1 answer 1

    Connect to the js-file another js-file does not work, so you have to use src and hang up the execution of the necessary functions on the page load.
    Although it is possible to dynamically create a script tag, set it with src and connect to, say, head. But, most likely, its contents will be executed after the function has completed.

    • one
      Bumped into requirejs. Googling maybe this is what you need - culebre
    • @culebre, are you me or Asen? =) - ling