+ 1
Document external JavaScript
Hello where and how we make to create an external Javascript document ? Thank
6 Respostas
+ 2
<script> in html has a src attribute; there you put the path of your js file.
+ 2
just save file with extention .js
+ 1
Hey , do you mean like keep javascript in external file ? It is the best practice to do so to keep your code clean.
I f you mean to use one js code in another js file. This is used often in js frameworks like angular.
+ 1
i undersrand the version with <script> and the version with js but my problem is to ceate the external file
+ 1
You can use a simple text editor for it.
+ 1
and put it like a link like it:
<script src="externe file.js"> ?
with the same form that a simple link for a web page ...?