JavaScript - PowerPoint PPT Presentation

1 / 10
About This Presentation
Title:

JavaScript

Description:

JavaScript. Jon's Head, W3Schools. What is JavaScript? JavaScript was designed to ... A JavaScript consists of lines of executable computer code ... – PowerPoint PPT presentation

Number of Views:145
Avg rating:3.0/5.0
Slides: 11
Provided by: jl34
Category:

less

Transcript and Presenter's Notes

Title: JavaScript


1
JavaScript
  • Jons Head, W3Schools

2
What is JavaScript?
  • JavaScript was designed to add interactivity to
    HTML pages
  • A JavaScript consists of lines of executable
    computer code
  • A JavaScript is usually embedded directly into
    HTML pages

3
If I know JavaScript do I know Java or visa versa?
  • No
  • Similar
  • Syntax based off C
  • Both object oriented
  • Different
  • Different Objects
  • Java is compiled
  • Marketing ploy by Netscape people

4
What can JavaScript do?
  • JavaScript gives HTML designers a programming
    tool
  • JavaScript can put dynamic text into an HTML page
  • JavaScript can react to events
  • JavaScript can read and write HTML elements
  • JavaScript can be used to create cookies

5
Where to put the JavaScript in my html code?
  • Inside the head tag
  • Between Script tags
  • lthtmlgt
  • ltheadgt
  • ltscript typetext/javascriptgtlt/scriptgt
  • ltscript typetext/javascript src /gt
  • lt/headgt
  • lt/htmlgt

6
Popup Messages
  • alert (..)
  • confirm(.)
  • prompt (, default value)

7
How do I make a button or text box?
  • ltinput typebutton valueThis is a buttongt

8
Events
  • onclick
  • ondblclick
  • onmouseover
  • onmouseout
  • onload

9
The DOM
  • HTML is a Tree! (this has to be a test question)
  • The DOM is a way for you to Walk the tree
  • DOM Document Object Model

10
DOM made Easy
  • document.getElementById (id)
Write a Comment
User Comments (0)
About PowerShow.com