-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy patholdway.html
50 lines (35 loc) · 1.35 KB
/
oldway.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<h1>JavaScript the Old Way</h1>
<p>The older way of writing JavaScript was just to include different script tags. Those tags might be different libraries or a JavaScript file you wrote.</p>
<h3>The Old Way</h3>
<p>
Step 1: Include a script tag.
</p>
<p>
Step 2: Write your JavaScript.
</p>
<p>
Step 3: That's it!
</p>
<p>
Step 4: Note this could get very complicated as your project starts to rely on lots of other libraries and other dependencies, or has lots of its own files. Then just including script tags isn't so simple anymore...
</p>
<h3>What This Page Looks Like</h3>
<p>Just include the script tags here, no other tools are used.
<pre>
<!-- Include an external javascript library like jquery -->
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js"></script>
<!-- Include a simple javascript file and it just runs. -->
<script src="oldway.js"></script>
</pre>
<h3>
<a href="newway.html">
See the New Way
</a>
</h3>
<a href="https://github.com/jkeesh/hello-browser-npm/blob/master/oldway.html">See the code for this page</a>
<h3>Samples</h3>
<div id="fillin"></div>
<!-- Include an external javascript library like jquery -->
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js"></script>
<!-- Include a simple javascript file and it just runs. -->
<script src="oldway.js"></script>