Transcript Document

Project 8
Integrating JavaScript
with HTML
Objectives





Discuss how to integrate JavaScript with HTML
Insert <SCRIPT> tags on a Web page
Write start and end <SCRIPT> tags
Define and use flickering to draw attention
Describe the background color property of the
document object
Objectives
 Set the background color of a Web page using
JavaScript
 Save the HTML file
 Test the Web page
 Discuss JavaScript variables
 Extract the system date
 Use several variables to construct a message
Objectives
 Describe the write() method of the document object
 Write a user-defined function that displays a
message and links visitors to a new Web site
 Describe how the setTimeout() method works
 Use the lastModified property to display the last
modified document date
 Print an HTML Notepad file
Introduction
 JavaScript is an object-based language
 Uses built-in objects
 Properties are attributes of objects
 Methods are actions performed on an
object
Introduction
 An event is the result of a user’s action
 Event handlers are the way to associate
that action with the set of JavaScript
codes you want executed
Opening a Web Page
 Open the Public Folder. Start Notepad,
and maximize the window. Click File on
the menu bar and then click Open.
When the Open dialog box displays,
type *.htm in the File name text box
Open from the Public Folder
the Project 8 folder, click
fun.htm and then point to
the open button
Click the Open button