Lecture11_JavaScript1

Lecture11_JavaScript1 - Chapter 18: Introduction to...

Info iconThis preview shows pages 1–8. Sign up to view the full content.

View Full Document Right Arrow Icon
Chapter 18: Introduction to JavaScript What JavaScript is not… What JavaScript is… Embedding in HTML Variables Declaration Assignment Data types in JS First three methods in JS
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
What JavaScript is… Programming Language INPUT -> PROCESSING -> OUTPUT Formal language with syntax and rules Written directly in HTML Dynamic
Background image of page 2
What JavaScript is not… Not a markup language. Not the only programming language. Not the only way to make pages dynamic. Not Java.
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Why and why not… One important advantage of choosing JS to learn programming Separate IDE, Compiler, debugger not required One important disadvantage of choosing JS to learn programming Not very robust syntax. Suffers in the same way HTML does
Background image of page 4
Embedding in HTML Browsers recognize JavaScript due to the special <SCRIPT> . .. </SCRIPT> tag. <html> <head> <title>JavaScript in HTML </title> </head> <body> (other html tags can still be present here) <script type= “text/javascript”> (JavaScript Code goes here) </script> </body> </html>
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
JS Example 1 <html> <head> </head> <body> <script type="text/javascript"> document.write("Hello World!"); </script> </body> </html>
Background image of page 6
Variables are like storage units and are created to hold values.
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 8
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 04/15/2009 for the course CS 170 taught by Professor Ganu during the Spring '09 term at Rutgers.

Page1 / 22

Lecture11_JavaScript1 - Chapter 18: Introduction to...

This preview shows document pages 1 - 8. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online