3Chp7) Javascript - Introduction

3Chp7) Javascript - Introduction - Chapter 7 - JavaScript:...

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

View Full Document Right Arrow Icon
Chapter 7 - JavaScript: Introduction to Scripting Outline 7.1 Introduction 7.2 Simple Program: Printing a Line of Text in a Web Page 7.3 Obtaining User Input with prompt Dialogs 7.3.1 Dynamic Welcome Page 7.3.2 Adding Integers 7.4 Memory Concepts 7.5 Arithmetic 7.6 Decision Making: Equality and Relational Operators 7.7 Web Resources
Background image of page 1

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

View Full DocumentRight Arrow Icon
Objectives In this lesson, you will learn: To be able to write simple JavaScript programs. To be able to use input and output statements. To understand basic memory concepts. To be able to use arithmetic operators. To understand the precedence of arithmetic operators. To be able to write decision-making statements. To be able to use relational and equality operators.
Background image of page 2
7.1 Introduction JavaScript scripting language Enhances functionality and appearance for web applications Client-side scripting Makes pages more dynamic and interactive Foundation for complex server-side scripting Program development Program control
Background image of page 3

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

View Full DocumentRight Arrow Icon
7.2 Simple Program: Printing a Line of Text in a Web Page Inline scripting Written in the < body> of a document <script> tag Indicate that the text is part of a script type attribute Specifies the type of file and the scripting language use writeln method Write a line in the document Escape character ( \ ) Indicates “special” character is used in the string alert method – Dialog box
Background image of page 4
welcome.html (1 of 1) 1 <?xml version =  "1.0" ?>  2 <!DOCTYPE html PUBLIC  "-//W3C//DTD XHTML 1.0 Strict//EN"  3     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" 4   5 <!-- Fig. 7.1: welcome.html    -->  6 <!-- Displaying a line of text -->  7   8 <html xmlns =  "http://www.w3.org/1999/xhtml" 9    <head>   10       <title> A First Program in JavaScript </title>  11   12       <script type =  "text/javascript" >                       13           <!--                                                 14          document.writeln(                                    15              "<h1>Welcome to JavaScript Programming!</h1>"  );  16           // -->                                               17       </script>                                               18   19    </head><body></body>  20 </html>  Object attribute behaviors
Background image of page 5

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

View Full DocumentRight Arrow Icon
welcome2.html (1 of 1) 1 <?xml version =  "1.0" ?>  2 <!DOCTYPE html PUBLIC  "-//W3C//DTD XHTML 1.0 Strict//EN"  3     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" 4   5 <!-- Fig. 7.2: welcome2.html                  -->  6 <!-- Printing a Line with Multiple Statements -->  7   8 <html xmlns =  "http://www.w3.org/1999/xhtml"
Background image of page 6
Image of page 7
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/06/2012 for the course FACULTY OF WXGE6320 taught by Professor Noraini during the Winter '09 term at University of Malaya.

Page1 / 30

3Chp7) Javascript - Introduction - Chapter 7 - JavaScript:...

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

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