O'Reilly logo

Teach Yourself Visually™ HTML5 by Mike Wooldridge

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

CHAPTER 12

Working with JavaScript

Looking for ways to add action and interest to your website? JavaScript can help you add interactivity to your HTML5 documents. This chapter shows you how to use JavaScript code to make your pages more interesting by changing page content in response to user behavior.

image

Understanding JavaScript

Understanding Script Events and Handlers

Add JavaScript to a Web Page

Link to a JavaScript File

Insert the Current Date and Time

Display an Alert Message Box

Display a Pop-Up Window

Create an Image Rollover Effect

Show a Hidden Element

Change Page Content

Display a Calculation

Understanding JavaScript

You can use snippets ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required