SlideShare une entreprise Scribd logo
1  sur  81
6 ,[object Object]
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
OBJECTIVES ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
6.1 Introduction ,[object Object],[object Object],[object Object],[object Object],[object Object]
Fig. 6.1  |  Enabling JavaScript in Internet Explorer 7
6.2 Simple Program: Displaying a Line of Text in a Web Page ,[object Object],[object Object],[object Object],[object Object]
Portability Tip 6.1 ,[object Object]
Common Programming Error 6.1 ,[object Object]
6.2 Simple Program: Displaying a Line of Text in a Web Page (Cont.) ,[object Object],[object Object]
Software Engineering Observation 6.1 ,[object Object]
6.2 Simple Program: Displaying a Line of Text in a Web Page (Cont.) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
6.2 Simple Program: Displaying a Line of Text in a Web Page (Cont.) ,[object Object],[object Object],[object Object],[object Object]
Good Programming Practice 6.1 ,[object Object]
Common Programming Error 6.2 ,[object Object]
6.2 Simple Program: Displaying a Line of Text in a Web Page (Cont.) ,[object Object],[object Object],[object Object],[object Object],[object Object]
Fig. 6.2  |  Displaying a line of text.  Script begins Specifies that we are using the JavaScript language Writes an  h1  welcome message in the XHTML document Prevents older browsers that do not support scripting from displaying the text of the script XHTML comment delimiter, commented for correct interpretation by all browsers Script ends
Error-Prevention Tip 6.1 ,[object Object]
6.3 Modifying Our First Program ,[object Object]
6.3 Modifying Our First Program (Cont.) ,[object Object]
Common Programming Error 6.3 ,[object Object]
Fig. 6.3  |  Printing one line with separate statements. Two  write  statements create one line of XHTML text Concatenation operator joins the string together, as it is split into multiple lines
Common Programming Error 6.4 ,[object Object]
6.3 Modifying Our First Program (Cont.) ,[object Object]
Fig. 6.4  |  Printing on multiple lines with a single statement. Inserts line-break Inserts line-break
6.3 Modifying Our First Program (Cont.) ,[object Object],[object Object],[object Object],[object Object],[object Object]
Fig. 6.5  |  Alert dialog displaying multiple lines. Creates a pop up box that alerts the welcome text to the user
Common Programming Error 6.5 ,[object Object]
Common Programming Error 6.6 ,[object Object]
6.3 Modifying Our First Program (Cont.) ,[object Object]
Fig. 6.6  |  Some common escape sequences.
6.4 Obtaining User Input with  prompt  Dialogs ,[object Object],[object Object],[object Object]
6.4 Obtaining User Input with  prompt  Dialogs (Cont.) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Good Programming Practice 6.2 ,[object Object]
Good Programming Practice 6.3 ,[object Object]
Common Programming Error 6.7 ,[object Object]
Good Programming Practice 6.4 ,[object Object]
6.4 Obtaining User Input with  prompt  Dialogs (Cont.) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Common Programming Error 6.8 ,[object Object]
Common Programming Error 6.9 ,[object Object]
6.4 Obtaining User Input with  prompt  Dialogs (Cont.) ,[object Object],[object Object],[object Object],[object Object]
6.4 Obtaining User Input with  prompt  Dialogs (Cont.) ,[object Object],[object Object]
Good Programming Practice 6.5 ,[object Object]
6.4 Obtaining User Input with  prompt  Dialogs (Cont.) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Common Programming Error 6.10 ,[object Object]
Fig. 6.7  |  Prompt box used on a welcome screen (Part 1 of 2).  Declares a new variable  Sets the identifier of the variable to  name Assigns the string entered by the user to the variable  name Inserts the value given to  name  into the XHTML text
Fig. 6.7  |  Prompt box used on a welcome screen (Part 2 of 2).
Fig. 6.8  |  Prompt dialog displayed by the  window  object’s  prompt  method.
Fig. 6.9  |  Addition script (Part 1 of 2).  Assigns the first input from the user to the variable  firstNumber Assigns the second input from the user to the variable  secondNumber Converts the strings entered by the user into integers
Fig. 6.9  |  Addition script (Part 2 of 2).
6.5 Memory Concepts ,[object Object],[object Object],[object Object],[object Object]
Fig. 6.10  |  Memory location showing the name and value of variable  number1 .
Fig. 6.11  |  Memory locations after inputting values for variables  number1  and  number2 .
Fig. 6.12  |  Memory locations after calculating the  sum  of  number1  and  number2  .
6.5 Memory Concepts (Cont.) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
6.6 Arithmetic ,[object Object],[object Object],[object Object]
Fig. 6.13  |  Arithmetic operators.
6.6 Arithmetic (Cont.) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Good Programming Practice 6.6 ,[object Object]
Fig. 6.14  |  Precedence of arithmetic operators.
Fig. 6.15  |  Order in which a second-degree polynomial is evaluated.
6.7 Decision Making: Equality and Relational Operators ,[object Object],[object Object],[object Object],[object Object]
Fig. 6.16  |  Equality and relational operators.
6.7 Decision Making: Equality and Relational Operators (Cont.) ,[object Object],[object Object]
Common Programming Error 6.11 ,[object Object]
Common Programming Error 6.12 ,[object Object]
Common Programming Error 6.13 ,[object Object]
6.7 Decision Making: Equality and Relational Operators (Cont.) ,[object Object],[object Object]
6.7 Decision Making: Equality and Relational Operators (Cont.) ,[object Object],[object Object],[object Object]
Fig. 6.17  |  Using equality and relational operators (Part 1 of 3). Set variable  now  to a new  Date  object Assigns  hour  to the value returned by the  Date  object’s  getHours  method Conditional statement: checks whether the current value of  hour  is less than 12 This statement will execute only if the previous condition was true
Fig. 6.17  |  Using equality and relational operators (Part 2 of 3). Conditional statement: checks whether the current value of  hour  is greater than or equal to 12 If  hour  is 12 or greater (the previous condition was true), subtract 12 from the value and reassign it to  hour   Conditional statement: checks whether the current value of  hour  is less than 6 Conditional statement: checks whether the current value of  hour  is greater than or equal to 6
Fig. 6.17  |  Using equality and relational operators (Part 3 of 3).
Good Programming Practice 6.7 ,[object Object]
Good Programming Practice 6.8 ,[object Object]
Good Programming Practice 6.9 ,[object Object]
Common Programming Error 6.14 ,[object Object]
Common Programming Error 6.15 ,[object Object]
Common Programming Error 6.16 ,[object Object]
Good Programming Practice 6.10 ,[object Object]
Good Programming Practice 6.11 ,[object Object]
Fig. 6.18  |  Precedence and associativity of the operators discussed so far.

Contenu connexe

Tendances

Murach : How to develop a single-page MVC web
Murach : How to develop a single-page MVC web Murach : How to develop a single-page MVC web
Murach : How to develop a single-page MVC web MahmoudOHassouna
 
Murach': HOW TO DEVELOP A DATA DRIVEN MVC WEB
Murach': HOW TO DEVELOP A DATA DRIVEN MVC WEB Murach': HOW TO DEVELOP A DATA DRIVEN MVC WEB
Murach': HOW TO DEVELOP A DATA DRIVEN MVC WEB MahmoudOHassouna
 
Module 2: C# 3.0 Language Enhancements (Slides)
Module 2: C# 3.0 Language Enhancements (Slides)Module 2: C# 3.0 Language Enhancements (Slides)
Module 2: C# 3.0 Language Enhancements (Slides)Mohamed Saleh
 
Servlet and jsp interview questions
Servlet and jsp interview questionsServlet and jsp interview questions
Servlet and jsp interview questionsSujata Regoti
 
Module 4: Introduction to ASP.NET 3.5 (PowerPoint Slides)
Module 4: Introduction to ASP.NET 3.5 (PowerPoint Slides)Module 4: Introduction to ASP.NET 3.5 (PowerPoint Slides)
Module 4: Introduction to ASP.NET 3.5 (PowerPoint Slides)Mohamed Saleh
 
Responsive Design and Bootstrap
Responsive Design  and BootstrapResponsive Design  and Bootstrap
Responsive Design and BootstrapMahmoudOHassouna
 
Ur/Web Programing Language: a brief overview
Ur/Web Programing Language: a brief overviewUr/Web Programing Language: a brief overview
Ur/Web Programing Language: a brief overviewAM Publications
 
wp-25tips-oltscripts-2287467
wp-25tips-oltscripts-2287467wp-25tips-oltscripts-2287467
wp-25tips-oltscripts-2287467Yutaka Takatsu
 
CIS 451: Introduction to ASP.NET
CIS 451: Introduction to ASP.NETCIS 451: Introduction to ASP.NET
CIS 451: Introduction to ASP.NETwebhostingguy
 
Murach : HOW to work with controllers and routing
Murach : HOW to work with controllers and routingMurach : HOW to work with controllers and routing
Murach : HOW to work with controllers and routingMahmoudOHassouna
 

Tendances (20)

MVC Training Part 2
MVC Training Part 2MVC Training Part 2
MVC Training Part 2
 
MVC Training Part 1
MVC Training Part 1MVC Training Part 1
MVC Training Part 1
 
Murach : How to develop a single-page MVC web
Murach : How to develop a single-page MVC web Murach : How to develop a single-page MVC web
Murach : How to develop a single-page MVC web
 
Intro To C++ - Class 14 - Midterm Review
Intro To C++ - Class 14 - Midterm ReviewIntro To C++ - Class 14 - Midterm Review
Intro To C++ - Class 14 - Midterm Review
 
JSP Error handling
JSP Error handlingJSP Error handling
JSP Error handling
 
Murach': HOW TO DEVELOP A DATA DRIVEN MVC WEB
Murach': HOW TO DEVELOP A DATA DRIVEN MVC WEB Murach': HOW TO DEVELOP A DATA DRIVEN MVC WEB
Murach': HOW TO DEVELOP A DATA DRIVEN MVC WEB
 
Module 2: C# 3.0 Language Enhancements (Slides)
Module 2: C# 3.0 Language Enhancements (Slides)Module 2: C# 3.0 Language Enhancements (Slides)
Module 2: C# 3.0 Language Enhancements (Slides)
 
Servlet and jsp interview questions
Servlet and jsp interview questionsServlet and jsp interview questions
Servlet and jsp interview questions
 
Client side scripting
Client side scriptingClient side scripting
Client side scripting
 
Module 4: Introduction to ASP.NET 3.5 (PowerPoint Slides)
Module 4: Introduction to ASP.NET 3.5 (PowerPoint Slides)Module 4: Introduction to ASP.NET 3.5 (PowerPoint Slides)
Module 4: Introduction to ASP.NET 3.5 (PowerPoint Slides)
 
Ajax
AjaxAjax
Ajax
 
Responsive Design and Bootstrap
Responsive Design  and BootstrapResponsive Design  and Bootstrap
Responsive Design and Bootstrap
 
Ur/Web Programing Language: a brief overview
Ur/Web Programing Language: a brief overviewUr/Web Programing Language: a brief overview
Ur/Web Programing Language: a brief overview
 
Unit 1.2
Unit 1.2Unit 1.2
Unit 1.2
 
Jsp element
Jsp elementJsp element
Jsp element
 
wp-25tips-oltscripts-2287467
wp-25tips-oltscripts-2287467wp-25tips-oltscripts-2287467
wp-25tips-oltscripts-2287467
 
Jquery
JqueryJquery
Jquery
 
html tutorial
html tutorialhtml tutorial
html tutorial
 
CIS 451: Introduction to ASP.NET
CIS 451: Introduction to ASP.NETCIS 451: Introduction to ASP.NET
CIS 451: Introduction to ASP.NET
 
Murach : HOW to work with controllers and routing
Murach : HOW to work with controllers and routingMurach : HOW to work with controllers and routing
Murach : HOW to work with controllers and routing
 

En vedette

Class newsletter required elements
Class newsletter required elementsClass newsletter required elements
Class newsletter required elementsChris Inman
 
Class newsletter required elements
Class newsletter required elementsClass newsletter required elements
Class newsletter required elementsChris Inman
 
Thinking Like A Researcher
Thinking Like A ResearcherThinking Like A Researcher
Thinking Like A ResearcherChris Inman
 
Thinking Like A Researcher
Thinking Like A ResearcherThinking Like A Researcher
Thinking Like A ResearcherChris Inman
 
Study: The Future of VR, AR and Self-Driving Cars
Study: The Future of VR, AR and Self-Driving CarsStudy: The Future of VR, AR and Self-Driving Cars
Study: The Future of VR, AR and Self-Driving CarsLinkedIn
 

En vedette (9)

Newsletter
NewsletterNewsletter
Newsletter
 
Class newsletter required elements
Class newsletter required elementsClass newsletter required elements
Class newsletter required elements
 
Class newsletter required elements
Class newsletter required elementsClass newsletter required elements
Class newsletter required elements
 
Thinking Like A Researcher
Thinking Like A ResearcherThinking Like A Researcher
Thinking Like A Researcher
 
Grading rubric
Grading rubricGrading rubric
Grading rubric
 
Practice
PracticePractice
Practice
 
Practice
PracticePractice
Practice
 
Thinking Like A Researcher
Thinking Like A ResearcherThinking Like A Researcher
Thinking Like A Researcher
 
Study: The Future of VR, AR and Self-Driving Cars
Study: The Future of VR, AR and Self-Driving CarsStudy: The Future of VR, AR and Self-Driving Cars
Study: The Future of VR, AR and Self-Driving Cars
 

Similaire à Chapter 6 ppt

Similaire à Chapter 6 ppt (20)

Session vii(java scriptbasics)
Session vii(java scriptbasics)Session vii(java scriptbasics)
Session vii(java scriptbasics)
 
Basics java scripts
Basics java scriptsBasics java scripts
Basics java scripts
 
What is java script
What is java scriptWhat is java script
What is java script
 
Javascript tutorial
Javascript tutorialJavascript tutorial
Javascript tutorial
 
Lect35 javascript
Lect35 javascriptLect35 javascript
Lect35 javascript
 
Introduction to JavaScript
Introduction to JavaScriptIntroduction to JavaScript
Introduction to JavaScript
 
CSC PPT 12.pptx
CSC PPT 12.pptxCSC PPT 12.pptx
CSC PPT 12.pptx
 
JAVA SCRIPT
JAVA SCRIPTJAVA SCRIPT
JAVA SCRIPT
 
Chapter1
Chapter1Chapter1
Chapter1
 
Javascript
JavascriptJavascript
Javascript
 
Java script by Act Academy
Java script by Act AcademyJava script by Act Academy
Java script by Act Academy
 
2javascript web programming with JAVA script
2javascript web programming with JAVA script2javascript web programming with JAVA script
2javascript web programming with JAVA script
 
Java Script
Java ScriptJava Script
Java Script
 
Basic JavaScript Tutorial
Basic JavaScript TutorialBasic JavaScript Tutorial
Basic JavaScript Tutorial
 
JavaScript
JavaScriptJavaScript
JavaScript
 
Web programming UNIT II by Bhavsingh Maloth
Web programming UNIT II by Bhavsingh MalothWeb programming UNIT II by Bhavsingh Maloth
Web programming UNIT II by Bhavsingh Maloth
 
WEB PROGRAMMING UNIT II BY BHAVSINGH MALOTH
WEB PROGRAMMING UNIT II BY BHAVSINGH MALOTHWEB PROGRAMMING UNIT II BY BHAVSINGH MALOTH
WEB PROGRAMMING UNIT II BY BHAVSINGH MALOTH
 
Test2
Test2Test2
Test2
 
Test2
Test2Test2
Test2
 
Unit 4 Java script.pptx
Unit 4 Java script.pptxUnit 4 Java script.pptx
Unit 4 Java script.pptx
 

Dernier

The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxheathfieldcps1
 
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdfVishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdfssuserdda66b
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.MaryamAhmad92
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin ClassesCeline George
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Jisc
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxAmanpreet Kaur
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsMebane Rash
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxEsquimalt MFRC
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - Englishneillewis46
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfSherif Taha
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentationcamerronhm
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptxMaritesTamaniVerdade
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.pptRamjanShidvankar
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfPoh-Sun Goh
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSCeline George
 

Dernier (20)

The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdfVishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
Spatium Project Simulation student brief
Spatium Project Simulation student briefSpatium Project Simulation student brief
Spatium Project Simulation student brief
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 

Chapter 6 ppt

  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6. Fig. 6.1 | Enabling JavaScript in Internet Explorer 7
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17. Fig. 6.2 | Displaying a line of text. Script begins Specifies that we are using the JavaScript language Writes an h1 welcome message in the XHTML document Prevents older browsers that do not support scripting from displaying the text of the script XHTML comment delimiter, commented for correct interpretation by all browsers Script ends
  • 18.
  • 19.
  • 20.
  • 21.
  • 22. Fig. 6.3 | Printing one line with separate statements. Two write statements create one line of XHTML text Concatenation operator joins the string together, as it is split into multiple lines
  • 23.
  • 24.
  • 25. Fig. 6.4 | Printing on multiple lines with a single statement. Inserts line-break Inserts line-break
  • 26.
  • 27. Fig. 6.5 | Alert dialog displaying multiple lines. Creates a pop up box that alerts the welcome text to the user
  • 28.
  • 29.
  • 30.
  • 31. Fig. 6.6 | Some common escape sequences.
  • 32.
  • 33.
  • 34.
  • 35.
  • 36.
  • 37.
  • 38.
  • 39.
  • 40.
  • 41.
  • 42.
  • 43.
  • 44.
  • 45.
  • 46. Fig. 6.7 | Prompt box used on a welcome screen (Part 1 of 2). Declares a new variable Sets the identifier of the variable to name Assigns the string entered by the user to the variable name Inserts the value given to name into the XHTML text
  • 47. Fig. 6.7 | Prompt box used on a welcome screen (Part 2 of 2).
  • 48. Fig. 6.8 | Prompt dialog displayed by the window object’s prompt method.
  • 49. Fig. 6.9 | Addition script (Part 1 of 2). Assigns the first input from the user to the variable firstNumber Assigns the second input from the user to the variable secondNumber Converts the strings entered by the user into integers
  • 50. Fig. 6.9 | Addition script (Part 2 of 2).
  • 51.
  • 52. Fig. 6.10 | Memory location showing the name and value of variable number1 .
  • 53. Fig. 6.11 | Memory locations after inputting values for variables number1 and number2 .
  • 54. Fig. 6.12 | Memory locations after calculating the sum of number1 and number2 .
  • 55.
  • 56.
  • 57. Fig. 6.13 | Arithmetic operators.
  • 58.
  • 59.
  • 60. Fig. 6.14 | Precedence of arithmetic operators.
  • 61. Fig. 6.15 | Order in which a second-degree polynomial is evaluated.
  • 62.
  • 63. Fig. 6.16 | Equality and relational operators.
  • 64.
  • 65.
  • 66.
  • 67.
  • 68.
  • 69.
  • 70. Fig. 6.17 | Using equality and relational operators (Part 1 of 3). Set variable now to a new Date object Assigns hour to the value returned by the Date object’s getHours method Conditional statement: checks whether the current value of hour is less than 12 This statement will execute only if the previous condition was true
  • 71. Fig. 6.17 | Using equality and relational operators (Part 2 of 3). Conditional statement: checks whether the current value of hour is greater than or equal to 12 If hour is 12 or greater (the previous condition was true), subtract 12 from the value and reassign it to hour Conditional statement: checks whether the current value of hour is less than 6 Conditional statement: checks whether the current value of hour is greater than or equal to 6
  • 72. Fig. 6.17 | Using equality and relational operators (Part 3 of 3).
  • 73.
  • 74.
  • 75.
  • 76.
  • 77.
  • 78.
  • 79.
  • 80.
  • 81. Fig. 6.18 | Precedence and associativity of the operators discussed so far.