JavaScript Basics презентация

Содержание


JavaScript Basics
 What is JavaScript?
 JavaScript is a programming language designedWhy Use JavaScript?
 JavaScript enhances Web pages with dynamic and interactiveWhat Can JavaScript Do?
 Common JavaScript tasks can replace server-side scripting.
JavaScript Syntax.
 Unlike HTML, JavaScript is case sensitive. 
 Dot SyntaxJavaScript Terminology. 
 JavaScript programming uses specialized terminology.
 Understanding JavaScript termsObjects
 Objects refers to windows, documents, images, tables, forms, buttons orProperties
 Properties are object attributes. 
 Object properties are defined byMethods
 Methods are actions applied to particular objects. Methods are whatEvents
 Events associate an object with an action. 
 e.g., theFunctions
 Functions are named statements that performs tasks. 
 e.g., functionValues
 Values are bits of information. 
 Values types and someVariables
 Variables contain values and use the equal sign to specifyExpressions 
 Expressions are commands that assign values to variables. 
Operators
 Operators are used to handle variables. 
 Types of operatorsMethods of Using JavaScript. 
 1. JavaScripts can reside in a1. Using Separate JavaScript Files.
 Linking can be advantageous if many2. Embedding JavaScript in HTML.
 When specifying a script only theUsing Comment Tags
 HTML comment tags should bracket any script. 
3. Using JavaScript in HTML Tags.
 Event handlers like onMouseover areCreating an Alert Message
 The following script in the <body> tagReturn to jqjacobs.net/web -- JavaScript Basics
 Return to jqjacobs.net/web -- JavaScript



Слайды и текст этой презентации
Слайд 1
Описание слайда:
JavaScript Basics What is JavaScript? JavaScript is a programming language designed for Web pages.


Слайд 2
Описание слайда:
Why Use JavaScript? JavaScript enhances Web pages with dynamic and interactive features. JavaScript runs in client software. JavaScript 1.3 works with version 4.0 browsers.

Слайд 3
Описание слайда:
What Can JavaScript Do? Common JavaScript tasks can replace server-side scripting. JavaScript enables shopping carts, form validation, calculations, special graphic and text effects, image swapping, image mapping, clocks, and more.

Слайд 4
Описание слайда:
JavaScript Syntax. Unlike HTML, JavaScript is case sensitive. Dot Syntax is used to combine terms. e.g., document.write("Hello World") Certain characters and terms are reserved. JavaScript is simple text (ASCII).

Слайд 5
Описание слайда:
JavaScript Terminology. JavaScript programming uses specialized terminology. Understanding JavaScript terms is fundamental to understanding the script. Objects, Properties, Methods, Events, Functions, Values, Variables, Expressions, Operators.

Слайд 6
Описание слайда:
Objects Objects refers to windows, documents, images, tables, forms, buttons or links, etc. Objects should be named. Objects have properties that act as modifiers.

Слайд 7
Описание слайда:
Properties Properties are object attributes. Object properties are defined by using the object's name, a period, and the property name. e.g., background color is expressed by: document.bgcolor . document is the object. bgcolor is the property.

Слайд 8
Описание слайда:
Methods Methods are actions applied to particular objects. Methods are what objects can do. e.g., document.write(”Hello World") document is the object. write is the method.

Слайд 9
Описание слайда:
Events Events associate an object with an action. e.g., the OnMouseover event handler action can change an image. e.g., the onSubmit event handler sends a form. User actions trigger events.

Слайд 10
Описание слайда:
Functions Functions are named statements that performs tasks. e.g., function doWhatever () {statement here} The curly braces contain the statements of the function. JavaScript has built-in functions, and you can write your own.

Слайд 11
Описание слайда:
Values Values are bits of information. Values types and some examples include: Number: 1, 2, 3, etc. String: characters enclosed in quotes. Boolean: true or false. Object: image, form Function: validate, doWhatever

Слайд 12
Описание слайда:
Variables Variables contain values and use the equal sign to specify their value. Variables are created by declaration using the var command with or without an initial value state. e.g. var month; e.g. var month = April;

Слайд 13
Описание слайда:
Expressions Expressions are commands that assign values to variables. Expressions always use an assignment operator, such as the equals sign. e.g., var month = May; is an expression. Expressions end with a semicolon.

Слайд 14
Описание слайда:
Operators Operators are used to handle variables. Types of operators with examples: Arithmetic operators, such as plus. Comparisons operators, such as equals. Logical operators, such as and. Control operators, such as if. Assignment and String operators.

Слайд 15
Описание слайда:
Methods of Using JavaScript. 1. JavaScripts can reside in a separate page. 2. JavaScript can be embedded in HTML documents -- in the <head>, in the <body>, or in both. 3. JavaScript object attributes can be placed in HTML element tags. e.g., <body onLoad="alert('WELCOME')">

Слайд 16
Описание слайда:
1. Using Separate JavaScript Files. Linking can be advantageous if many pages use the same script. Use the source element to link to the script file.

Слайд 17
Описание слайда:
2. Embedding JavaScript in HTML. When specifying a script only the tags <script> and </script> are essential, but complete specification is recommended:

Слайд 18
Описание слайда:
Using Comment Tags HTML comment tags should bracket any script. The <!-- script here --> tags hide scripts in HTML and prevent scripts from displaying in browsers that do not interpret JavaScript. Double slashes // are the signal characters for a JavaScript single-line comment.

Слайд 19
Описание слайда:
3. Using JavaScript in HTML Tags. Event handlers like onMouseover are a perfect example of an easy to add tag script.

Слайд 20
Описание слайда:
Creating an Alert Message The following script in the <body> tag uses the onLoad event to display an Alert window The message is specified within parenthesis.

Слайд 21
Описание слайда:
Return to jqjacobs.net/web -- JavaScript Basics Return to jqjacobs.net/web -- JavaScript Basics


Скачать презентацию на тему JavaScript Basics можно ниже:

Похожие презентации