码家

Web Platform, Cloud and Mobile Application Development

  博客园 :: 首页 :: 新随笔 :: 联系 :: 订阅 :: 管理 ::

Unit 3 – JavaScript

Features of JavaScript

  1. An interpreted language
  2. Embedded within HTML
  3. Minimal Syntax-Easy to learn(C syntax and java ooc)
  4. Mainly used for client side scripting because it is supported by all the browers
  5. Designed for programming user events

Difference between OOP and Object-based

Embedding JavaScript into HTML page

Deferred and Immediate Script

JavaScript-lexical structure

JavaScript-Variables

JavaScript-Implicit data types

JavaScript-Operators

JavaScript-Control structures

JavaScript-Loop

User defined Functions

Top-Level functions(window object functions)

In-built properties(window object property)

Dialog boxes(window object methods)

Objects

  1. Creating objects
  2. Date object
  3. Math object
  4. String object
  5. Arrays

JavaScript as a referenced file

  1. Embedded
  2. External file
  3. Inline
  4. The important use of the referenced file is

Reusable function can be placed in the .js file

Multiple pages can use the same .js file

Maintenance will be easier

HTML event Handlers

posted on 2011-05-16 18:28  海山  阅读(141)  评论(0)    收藏  举报