Presentation is loading. Please wait.

Presentation is loading. Please wait.

JavaScript Defined JavaScript Basics Definitions JavaScript is an object-oriented programming language designed for the world wide web. JavaScript code.

Similar presentations


Presentation on theme: "JavaScript Defined JavaScript Basics Definitions JavaScript is an object-oriented programming language designed for the world wide web. JavaScript code."— Presentation transcript:

1 JavaScript Defined JavaScript Basics Definitions JavaScript is an object-oriented programming language designed for the world wide web. JavaScript code is embedded directly into common HTML documents and is interpreted by the web browser when the document is loaded. JavaScript allows web developers to include high levels of interactivity in web pages.

2 Why Learn JavaScript? Broad support among web browsers Vast libraries of scripts available onlin Allows use of reusable code libraries Similar syntax to C, C++, and Java Encourages creative problem solving

3 Some examples of usage Enhance interactivity (mouseover swap). Provide interesting visual effects (snow falling, cursor trails). Validate forms for accurate data.

4 Markup Languages HTML is a mark-up language used to create Web pages for a cross-platform (many operating systems) environment on the Web or an intranet. HTML is not a programming language. CSS (Cascading Style Sheets rules) is the technology used along with HTML to create formatting for Web pages. Dynamic HTML (DHTML) is a group of technologies used to create interactivity on a Web page such as a change which occurs from a user action. HTMLmark-up languageDHTML

5 Programming Languages I Each programming language was created to solve some type of particular problem. There are hundreds of programming languages. The instructions in a computer program tell the computer what steps to take to solve a problem. Programming languages specify an exact sequence or order of operations. Program logic determines the next step to execute in a procedural language and this logic determination is made in response to conditions and user action. The traditional procedural languages include but are not limited to: BASIC, C, COBOL, FORTRAN, Pascal, C++.

6 Compiled vs Interpreted "Compiled language" means the source code of the program is translated (compiled) into machine-language (composed only of 0's and 1's) before use. When it is time to run the program, the translated version is used by the computer instead of the original source code. Unless you are the programmer, you might never see the source code of the program you are using. "Interpreted language" means when it loads a page, the browser's interpreter uses the original source code and translates it into machine language. The translation is stored in the browser's memory ready to run all or portions of it as appropriate. When the browser window gets ready to load a different web page, the previous page's translated JavaScript is discarded.

7 How the browser knows it is JavaScript: JavaScript program lines must be between tags unless the line is within an HTML tag. The JavaScript between the tags may also be enclosed with HTML comment tags (for older browser support). Often, you'll find JavaScript in this format:

8 Using Javascript with Expression Web As web designers we work in code view. We copy the javascript code from the source. Following directions of the programmer, we paste the code into the head or body of the html document that is open in EW. If images are required for the script, we save them to our flashdrive and import them into EW. Some scripts provide variables that we can modify to our specific needs.


Download ppt "JavaScript Defined JavaScript Basics Definitions JavaScript is an object-oriented programming language designed for the world wide web. JavaScript code."

Similar presentations


Ads by Google