Presentation is loading. Please wait.

Presentation is loading. Please wait.

An Introduction to JavaScript By: John Coliton Tuesday, November 10, 1998 Center for Teaching and Learning.

Similar presentations


Presentation on theme: "An Introduction to JavaScript By: John Coliton Tuesday, November 10, 1998 Center for Teaching and Learning."— Presentation transcript:

1 An Introduction to JavaScript By: John Coliton Tuesday, November 10, 1998 Center for Teaching and Learning

2 JavaScript Background A Scripting Language Designed to add interactivity to Web pages Developed by Netscape as LiveScript –A proprietary feature of Netscape Browser –Late approved by Sun as official scripting language complement to JAVA

3 JavaScript Pros and Cons Designed to be executed by browser –No special compiler needed –Code typed directly into HTML document –Easy to create scripts –Easy to copy other scripts (or be copied) Fully supported by Netscape - not I.E.

4 Browser Compatibility JavaScript 1.0 –Netscape 2.x and I.E. 3.x JavaScript 1.1 –Netscape 3.x and some features in I.E. 3.x JavaScript 1.2 –Netscape 4.x and I.E. 4.x

5 Where to Put Scripts HEAD section of HTML –Stored in a script and ignored by browser until “called” by body BODY section of HTML –Executed immediately in a script –Executed later in an “event” handler like a mouse click or selecting a button on a form.

6 Hiding Scripts Hide scripts from old browsers with comment tags. – – //This is a comment in JavaScript Used together they can hide most anything – (Older browsers ignore this tag) – <!-- (script ignores comment mark) – // --> (ends comment but hides from script) – (ends script)

7 Checking for Compatibility Script tag options: – Browser must be at least Netscape 2.0 or I.E. 3.0 – Browser must be at least Netscape 3.0 or I.E. 4.0 – Browser must be at least Netscape 4.0 or I.E. 4.0


Download ppt "An Introduction to JavaScript By: John Coliton Tuesday, November 10, 1998 Center for Teaching and Learning."

Similar presentations


Ads by Google