1 / 8

Introduction to JavaScript

Introduction to JavaScript. AWAR4S May 2012. What Is JavaScript?. JavaScript (Often referred to as JS) is a programming language which is run by web browsers. With JavaScript, you can get visitors to your site to run programs in their browser. Some facts:

Download Presentation

Introduction to JavaScript

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Introduction to JavaScript AWAR4S May 2012

  2. What Is JavaScript? JavaScript (Often referred to as JS) is a programming language which is run by web browsers. With JavaScript, you can get visitors to your site to run programs in their browser. Some facts: • JavaScript IS NOT Java! They are two different languages. • JavaScript had two competing forms for a while, until a standard was agreed upon. The standard form of JavaScript is called ECMAScript.

  3. Why Use JavaScript? If you have used a modern browser, odds are very good that you’ve already run JavaScript programs in your browser: • JS can check whether info entered into a web page is correct or not. • JS can produce ‘spinners’ which you see when pages are being loaded. • JS can produce animations which look like Flash but which don’t require the Flash player. • JS can allow web pages to do math tasks such as having online calculators, online graphing, etc.. • JS can talk with databases when you either store or retrieve settings from a web page, such as an online shopping page.

  4. JavaScript In Brief… To include JS code in a web page, you must use the <script> and </script> tags. For example: <html> In the web page, but not in your program… <script> //This is where your Code will go! </script> Still in the web page, but not in your program… </html>

  5. Online JavaScript Tutorial Pages As we have seen with HTML and CSS, the w3schools pages have a lot of useful info on JavaScript. The starting URL for their tutorial is found at: http://www.w3schools.com/js/default.asp (We will be looking at selections from the JavaScript topics, not necessarily all of them…)

  6. Your Task • If you have experience in a programming language such as C, C#, Java, or Visual Basic, JavaScript should be easy to adjust to. • For those with a more Graphics-related background, this first assignment will introduce the basic concepts of how to set up JS code, where it belongs in a web page, and how to include JS comments in your code.

  7. Your Task, Continued… Please go to the URL: http://www.w3schools.com/js/default.asp , and read through the first five topics on the right: • JS Introduction • JS How To • JS Where To • JS Statements • JS Comments

  8. Your Task, Continued… NOTE: • The Tutorial authors seem to have all of their code between <script> and </script> tags. For LARGE scripts, or scripts which have to be shared between two or more pages, LINKS to separate JS files should be used! This is the same format which is used for CSS code… • Additional features of JS can be used when pages are written using HTML5. This is another reason to make your pages Validated in HTML5!

More Related