Javascript in several html's

0

I am learning and using JavaScript and would like to know if it is possible to use scripts from a .js file in several other .html files, with functions and everything else. If it is possible, just call the .js file in .html by the tag <script> ?

    
asked by anonymous 18.09.2018 / 18:34

1 answer

3

Yes, you can include the same javascript file on multiple pages using the script tag.

Including pages from other sites. See jQuery for example, which you can include on any page using this hosting:

<script type="text/javascript" src="https://code.jquery.com/jquery-3.3.1.min.js">
    
18.09.2018 / 18:37