Presentation is loading. Please wait.

Presentation is loading. Please wait.

Computer Science and Software Engineering© 2014 Project Lead The Way, Inc. HTML5 Evolving Standards JavaScript.

Similar presentations


Presentation on theme: "Computer Science and Software Engineering© 2014 Project Lead The Way, Inc. HTML5 Evolving Standards JavaScript."— Presentation transcript:

1 Computer Science and Software Engineering© 2014 Project Lead The Way, Inc. HTML5 Evolving Standards JavaScript

2 HTML5 Still being developed Being implemented as pieces are adopted A suite of technologies: –HTML5 specification with and elements to replace Flash –Ties to CSS and JavaScript using Document Object Model (DOM) –JavaScript APIs for location- aware computing

3 Evolving Standards Example: Geolocation

4 Evolving Standards Example: Geolocation

5 Evolving Standards Example: Geolocation

6 Evolving Standards Example: Geolocation

7 JavaScript – Why Use It? Responds to user events Can customize the page using local information Makes webpage interactive Examples: –Videos with player controls –Drawing canvas for art that responds to text box entry –Maps that work from “current location”

8 JavaScript – How to Include It Can be in the HTML element: Your JavaScript goes here Can be in a separate file, linked from HTML

9 JavaScript – Syntax Variables must be declared when first used var clickCounter; Statements end in semicolon (optional but recommended) Whitespace is usually ignored. One statement can use multiple lines of code. Blocks are created by { } instead of indentation And so on... This course does not teach you JavaScript!

10 JavaScript – Conditionals Boolean expression in parentheses. “if” block and “else” block are either a single statement or a block using { } No semicolon after the Boolean conditional if ( txt != "") { msg = "You typed "+ txt; msg = document.getElementById("input"); } else msg = "You must provide input";

11 Document Object Model DOM = Document Object Model A tree Allows you to refer to elements on the page


Download ppt "Computer Science and Software Engineering© 2014 Project Lead The Way, Inc. HTML5 Evolving Standards JavaScript."

Similar presentations


Ads by Google