August 2015
Beginner
1075 pages
40h 42m
English
JavaScript can be embedded directly inside a web page or stored as a separate script file. Before getting started with the language, let’s look at where you can write JavaScript, how you store it, and how you can include it in your pages.
You can embed JavaScript code directly inside a page. This is true of .html pages and .cshtml views (and other .NET pages). The JavaScript will execute where it is found within the page. Later in this chapter, you will see how you can use events to determine when your JavaScript code should execute.
The JavaScript code placed inside a page should be contained within a <script> tag. The <script> tag looks like this.
<script type="text/javascript"> ...
Read now
Unlock full access