Integrating JavaScript and HTML5 HTML5 & CSS 7 th Edition

Click here to load reader

download Integrating JavaScript and HTML5 HTML5 & CSS 7 th Edition

of 30

  • date post

    29-Dec-2015
  • Category

    Documents

  • view

    222
  • download

    7

Embed Size (px)

Transcript of Integrating JavaScript and HTML5 HTML5 & CSS 7 th Edition

Slide 1

Integrating JavaScriptand HTML5HTML5 & CSS7th Edition1Describe JavaScript and how it can be integrated with HTML5Describe how the tag container is used to display textDescribe a valid JavaScript user-defined functionWrite the code to create a section on a Web pageChapter 9: Integrating JavaScript and HTML52Chapter Objectives2Define and describe JavaScript variableExtract the current system date Calculate the number of days from the current date to a future dateUse the innerHTML property to display a dynamic message to a Web pageChapter 9: Integrating JavaScript and HTML53Chapter Objectives3Write a user-defined JavaScript function that changes the color of the browsers scroll barWrite a user-defined JavaScript function to open a Web page from a tag valueUse the lastModified property to display the date the document was last modifiedUse an event handler to invoke a JavaScript user-defined function when a Web page is loadedChapter 9: Integrating JavaScript and HTML54Chapter Objectives4Determine what you want the code to accomplishDetermine where on the Web page you want the code to appearDetermine where you want to store the Web page during developmentChapter 9: Integrating JavaScript and HTML55Plan Ahead

Chapter 9: Integrating JavaScript and HTML56Built-In JavaScript Objects6Chapter 9: Integrating JavaScript and HTML57Built-In JavaScript Objects

7

Chapter 9: Integrating JavaScript and HTML58JavaScript

Chapter 9: Integrating JavaScript and HTML59Entering a Tag Container

User-defined functions are normally written in the section so that this code is loaded before the remainder of the Web pageChapter 9: Integrating JavaScript and HTML510Writing User-Defined Functions

10

Chapter 9: Integrating JavaScript and HTML511Writing User-Defined FunctionsAlthough JavaScript code can be placed anywhere in the HTML code in a section, developers follow the coding practice and place user-defined functions and variables in the sectionChapter 9: Integrating JavaScript and HTML512Inserting Tags in the Section

Chapter 9: Integrating JavaScript and HTML513Entering the Start and Comment Tags

13JavaScript uses variables to store values temporarily in internal memoryA variables value can change, depending on the results of an expression or data entered by a user from a formChapter 9: Integrating JavaScript and HTML514Using JavaScript Variables

Chapter 9: Integrating JavaScript and HTML515Using JavaScript VariablesChapter 9: Integrating JavaScript and HTML516Extracting the Current System Date Using the Date() Object

16Chapter 9: Integrating JavaScript and HTML517Calculating the Number of Days to a Future Date

Chapter 9: Integrating JavaScript and HTML518Displaying Text and Variable Values to a Web Page Using innerHTML

18Chapter 9: Integrating JavaScript and HTML519Entering the User-Defined Function to Change the Browser Scroll Bar Color

19

Chapter 9: Integrating JavaScript and HTML520Using the selectedIndex Property and the Location Object to Link to a New URL

Chapter 9: Integrating JavaScript and HTML521Entering the User- Defined Function to Link to a New URL Using the Drop-Down Menu21Chapter 9: Integrating JavaScript and HTML522Including the Date Last Modified and a Copyright Message in a Text String

Chapter 9: Integrating JavaScript and HTML523Including the Date Last Modified and a Copyright Message in a Text String

Chapter 9: Integrating JavaScript and HTML524Entering the End Comment and Tags24Chapter 9: Integrating JavaScript and HTML525Associating User-Defined Functions with the onload Event

Chapter 9: Integrating JavaScript and HTML526Associating a User-Defined Function with the OnChange Event

Describe JavaScript and how it can be integrated with HTML5Describe how the tag container is used to display textDescribe a valid JavaScript user-defined functionWrite the code to create a section on a Web pageChapter 9: Integrating JavaScript and HTML527Chapter Summary27Define and describe JavaScript variableExtract the current system date Calculate the number of days from the current date to a future dateUse the innerHTML property to display a dynamic message to a Web pageChapter 9: Integrating JavaScript and HTML528Chapter Summary28Write a user-defined JavaScript function that changes the color of the browsers scroll barWrite a user-defined JavaScript function to open a Web page from a tag valueUse the lastModified property to display the date the document was last modifiedUse an event handler to invoke a JavaScript user-defined function when a Web page is loadedChapter 9: Integrating JavaScript and HTML529Chapter Summary29

Chapter 9 CompleteHTML7th Edition30