SlideShare une entreprise Scribd logo
1  sur  31
JavaScript Why..What..How? Mohammed Alhusban
Introduction  (5 Mins) Simple Program: Printing a Line of Text in a Web Page (10 Mins) Prompt Dialogs: Obtaining User Input   Dynamic Welcome Page Outline Why & What  How
Why JavaScript? Enhances functionality and appearance of the web page. Client-side scripting Makes pages more dynamic and interactive Easy-to-use Built into web browsers and other applications Offering functions such as  Form validation (JS can be used to validate data before it is submitted to a server. This saves the server from extra processing). JavaScript can be used to set and retrieve web cookies (A JavaScript can be used to store and retrieve information on the visitor's computer). Cool stuff like drop-down menus. Hide and show elements. Animation. JS
5 Websites That use JavaScript Animation Effectively!!
What is JS?  JavaScript is a very popular scripting language on the internet. Cross Platforms. JavaScript language runs inmultiple environments and on many platforms. JavaScript is usually embedded directly into HTML pages. JavaScript is an interpreted language (means that scripts execute without preliminary compilation)       Father of JS       Brendan Eich
How..?
Before going any further One of the most important things to do when learning a new language is to master basic input and output which is why Welcome to has become almost a cliché in programming textbooks. Output Methods ,[object Object]
Windows.alert (ex.2)input Methods ,[object Object],[object Object]
Code: Ex.1 html opening tag
Code: Ex.1 html opening tag  Usually Java Scripts are included within the head tag, it also could be included in the body tag.
Code: Ex.1 html opening tag  Usually Java Scripts are included within the head tag, it also could be included in the body tag.  One reason JavaScript is so popular is that it's relatively easy to add JavaScript to a web page JavaScript Code block
Code: Ex.1 <script> tag: Indicate that the text is part of a script
Code: Ex.1 type attribute:  Specifies the type of file and the scripting language use.
Code: Ex.1 <script> tag: Indicate that the text is part of a script type attribute:  Specifies the type of file and the scripting language use. </script> End or Close Tag
Code: Ex.1 A Method used to output a string onto the Browser
Code: Ex.1 The string, that writeln method takes and printout on the browser. Whatever between the quotations mark will be printed as is. A Method used to output a string onto the Browser
Execute Ex.1:         Output Run
Code: Ex.2
Code: Ex.2 Popup windows
Code: Ex.2 String will be printed out on the msg box or popup window Popup window
Execute Ex.2:             Output
Execute Ex.2:
JavaScript Data Types and Variables Variable is a facility for storing data. The current value of the variable is the data actually stored in the variable. Variable in JavaScript has name and value Declare a variable  give it a name ( ex. var x ) Initialize a variable  give it a value ( ex. x = 100) In order to use variable, they must be declared and initialized.  Variable types are not important in JavaScript. They may be interchanged as necessary. This means that if a variable is a string one minute, it can be an integer the next. Declare  initialize  Call
Code: Ex.3
Code: Ex.3 Declaration of a variable
Code: Ex.3 You can declare JavaScript variables with the  var statement What? Huh
Code: Ex.3 Initialization of the variable (name)
Code: Ex.3 Prompt window prints out the string between quotations
Code: Ex.3 writeln method prints the following in the browser: string + value of the variable name + string  Hello + name value (input name) + Welcome to JavaScript Programming!
Run: Ex.3
Next Lecture  Learning to Love JavaScript Prototypes Thank you, I hope you have enjoyed this presentation

Contenu connexe

Tendances (20)

jQuery
jQueryjQuery
jQuery
 
Html 5
Html 5Html 5
Html 5
 
Css
CssCss
Css
 
CSS Basics
CSS BasicsCSS Basics
CSS Basics
 
Html
HtmlHtml
Html
 
CSS
CSSCSS
CSS
 
Php Presentation
Php PresentationPhp Presentation
Php Presentation
 
Event In JavaScript
Event In JavaScriptEvent In JavaScript
Event In JavaScript
 
JavaScript - Chapter 12 - Document Object Model
  JavaScript - Chapter 12 - Document Object Model  JavaScript - Chapter 12 - Document Object Model
JavaScript - Chapter 12 - Document Object Model
 
Java script
Java scriptJava script
Java script
 
Introduction to Javascript
Introduction to JavascriptIntroduction to Javascript
Introduction to Javascript
 
Javascript 101
Javascript 101Javascript 101
Javascript 101
 
Html training slide
Html training slideHtml training slide
Html training slide
 
Unit 2 dhtml
Unit 2 dhtmlUnit 2 dhtml
Unit 2 dhtml
 
CSS
CSSCSS
CSS
 
Datatype in JavaScript
Datatype in JavaScriptDatatype in JavaScript
Datatype in JavaScript
 
Json
JsonJson
Json
 
HTML
HTMLHTML
HTML
 
reactJS
reactJSreactJS
reactJS
 
Java script
Java scriptJava script
Java script
 

En vedette

Deploying java beans in jsp
Deploying java beans in jspDeploying java beans in jsp
Deploying java beans in jspPriyanka Pradhan
 
Java script final presentation
Java script final presentationJava script final presentation
Java script final presentationAdhoura Academy
 
Servlets and jsp pages best practices
Servlets and jsp pages best practicesServlets and jsp pages best practices
Servlets and jsp pages best practicesejjavies
 
JSP Scope variable And Data Sharing
JSP Scope variable And Data SharingJSP Scope variable And Data Sharing
JSP Scope variable And Data Sharingvikram singh
 
21 Essential JavaScript Interview Questions
21 Essential JavaScript Interview Questions21 Essential JavaScript Interview Questions
21 Essential JavaScript Interview QuestionsArc & Codementor
 
Java PRACTICAL file
Java PRACTICAL fileJava PRACTICAL file
Java PRACTICAL fileRACHIT_GUPTA
 
Advanced Java Practical File
Advanced Java Practical FileAdvanced Java Practical File
Advanced Java Practical FileSoumya Behera
 
Ask the XPages Experts
Ask the XPages ExpertsAsk the XPages Experts
Ask the XPages ExpertsTeamstudio
 

En vedette (15)

Oracle docs rmi applications
Oracle docs rmi applicationsOracle docs rmi applications
Oracle docs rmi applications
 
Deploying java beans in jsp
Deploying java beans in jspDeploying java beans in jsp
Deploying java beans in jsp
 
Java script final presentation
Java script final presentationJava script final presentation
Java script final presentation
 
Servlets and jsp pages best practices
Servlets and jsp pages best practicesServlets and jsp pages best practices
Servlets and jsp pages best practices
 
JSP Scope variable And Data Sharing
JSP Scope variable And Data SharingJSP Scope variable And Data Sharing
JSP Scope variable And Data Sharing
 
Javascript Question
Javascript QuestionJavascript Question
Javascript Question
 
Java Servlets & JSP
Java Servlets & JSPJava Servlets & JSP
Java Servlets & JSP
 
Jdbc 1
Jdbc 1Jdbc 1
Jdbc 1
 
21 Essential JavaScript Interview Questions
21 Essential JavaScript Interview Questions21 Essential JavaScript Interview Questions
21 Essential JavaScript Interview Questions
 
Ad java prac sol set
Ad java prac sol setAd java prac sol set
Ad java prac sol set
 
Java PRACTICAL file
Java PRACTICAL fileJava PRACTICAL file
Java PRACTICAL file
 
Advanced Java Practical File
Advanced Java Practical FileAdvanced Java Practical File
Advanced Java Practical File
 
Java codes
Java codesJava codes
Java codes
 
UGC net exam notes
UGC net exam notesUGC net exam notes
UGC net exam notes
 
Ask the XPages Experts
Ask the XPages ExpertsAsk the XPages Experts
Ask the XPages Experts
 

Similaire à JavaScript Why..What..How? Introduction

Basic JavaScript Tutorial
Basic JavaScript TutorialBasic JavaScript Tutorial
Basic JavaScript TutorialDHTMLExtreme
 
Session vii(java scriptbasics)
Session vii(java scriptbasics)Session vii(java scriptbasics)
Session vii(java scriptbasics)Shrijan Tiwari
 
Basics java scripts
Basics java scriptsBasics java scripts
Basics java scriptsch samaram
 
8.-Javascript-report powerpoint presentation
8.-Javascript-report powerpoint presentation8.-Javascript-report powerpoint presentation
8.-Javascript-report powerpoint presentationJohnLagman3
 
Iwt note(module 2)
Iwt note(module 2)Iwt note(module 2)
Iwt note(module 2)SANTOSH RATH
 
Basic Java script handouts for students
Basic Java script handouts for students Basic Java script handouts for students
Basic Java script handouts for students shafiq sangi
 
Client side scripting using Javascript
Client side scripting using JavascriptClient side scripting using Javascript
Client side scripting using JavascriptBansari Shah
 
INTRODUCTION TO CLIENT SIDE PROGRAMMING
INTRODUCTION TO CLIENT SIDE PROGRAMMINGINTRODUCTION TO CLIENT SIDE PROGRAMMING
INTRODUCTION TO CLIENT SIDE PROGRAMMINGProf Ansari
 
JavaScript: Implementations And Applications
JavaScript: Implementations And ApplicationsJavaScript: Implementations And Applications
JavaScript: Implementations And ApplicationsPragya Pai
 
JAVA SCRIPT
JAVA SCRIPTJAVA SCRIPT
JAVA SCRIPTGo4Guru
 
Introduction to Javascript
Introduction to JavascriptIntroduction to Javascript
Introduction to Javascriptambuj pathak
 

Similaire à JavaScript Why..What..How? Introduction (20)

Basic JavaScript Tutorial
Basic JavaScript TutorialBasic JavaScript Tutorial
Basic JavaScript Tutorial
 
CSC PPT 12.pptx
CSC PPT 12.pptxCSC PPT 12.pptx
CSC PPT 12.pptx
 
Javascript tutorial
Javascript tutorialJavascript tutorial
Javascript tutorial
 
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
 
Javascript
JavascriptJavascript
Javascript
 
8.-Javascript-report powerpoint presentation
8.-Javascript-report powerpoint presentation8.-Javascript-report powerpoint presentation
8.-Javascript-report powerpoint presentation
 
Iwt note(module 2)
Iwt note(module 2)Iwt note(module 2)
Iwt note(module 2)
 
Basic Java script handouts for students
Basic Java script handouts for students Basic Java script handouts for students
Basic Java script handouts for students
 
Web programming
Web programmingWeb programming
Web programming
 
Client side scripting using Javascript
Client side scripting using JavascriptClient side scripting using Javascript
Client side scripting using Javascript
 
INTRODUCTION TO CLIENT SIDE PROGRAMMING
INTRODUCTION TO CLIENT SIDE PROGRAMMINGINTRODUCTION TO CLIENT SIDE PROGRAMMING
INTRODUCTION TO CLIENT SIDE PROGRAMMING
 
Lect35 javascript
Lect35 javascriptLect35 javascript
Lect35 javascript
 
Javascript tutorial
Javascript tutorialJavascript tutorial
Javascript tutorial
 
Javascript
JavascriptJavascript
Javascript
 
JavaScript: Implementations And Applications
JavaScript: Implementations And ApplicationsJavaScript: Implementations And Applications
JavaScript: Implementations And Applications
 
Java scipt
Java sciptJava scipt
Java scipt
 
JAVA SCRIPT
JAVA SCRIPTJAVA SCRIPT
JAVA SCRIPT
 
Introduction to Javascript
Introduction to JavascriptIntroduction to Javascript
Introduction to Javascript
 
Html JavaScript and CSS
Html JavaScript and CSSHtml JavaScript and CSS
Html JavaScript and CSS
 

Dernier

BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...fonyou31
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
The byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxThe byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxShobhayan Kirtania
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room servicediscovermytutordmt
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...Sapna Thakur
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpinRaunakKeshri1
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfchloefrazer622
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 

Dernier (20)

BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
The byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxThe byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptx
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room service
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 

JavaScript Why..What..How? Introduction

  • 2. Introduction (5 Mins) Simple Program: Printing a Line of Text in a Web Page (10 Mins) Prompt Dialogs: Obtaining User Input Dynamic Welcome Page Outline Why & What How
  • 3. Why JavaScript? Enhances functionality and appearance of the web page. Client-side scripting Makes pages more dynamic and interactive Easy-to-use Built into web browsers and other applications Offering functions such as Form validation (JS can be used to validate data before it is submitted to a server. This saves the server from extra processing). JavaScript can be used to set and retrieve web cookies (A JavaScript can be used to store and retrieve information on the visitor's computer). Cool stuff like drop-down menus. Hide and show elements. Animation. JS
  • 4. 5 Websites That use JavaScript Animation Effectively!!
  • 5. What is JS? JavaScript is a very popular scripting language on the internet. Cross Platforms. JavaScript language runs inmultiple environments and on many platforms. JavaScript is usually embedded directly into HTML pages. JavaScript is an interpreted language (means that scripts execute without preliminary compilation) Father of JS Brendan Eich
  • 7.
  • 8.
  • 9. Code: Ex.1 html opening tag
  • 10. Code: Ex.1 html opening tag Usually Java Scripts are included within the head tag, it also could be included in the body tag.
  • 11. Code: Ex.1 html opening tag Usually Java Scripts are included within the head tag, it also could be included in the body tag. One reason JavaScript is so popular is that it's relatively easy to add JavaScript to a web page JavaScript Code block
  • 12. Code: Ex.1 <script> tag: Indicate that the text is part of a script
  • 13. Code: Ex.1 type attribute: Specifies the type of file and the scripting language use.
  • 14. Code: Ex.1 <script> tag: Indicate that the text is part of a script type attribute: Specifies the type of file and the scripting language use. </script> End or Close Tag
  • 15. Code: Ex.1 A Method used to output a string onto the Browser
  • 16. Code: Ex.1 The string, that writeln method takes and printout on the browser. Whatever between the quotations mark will be printed as is. A Method used to output a string onto the Browser
  • 17. Execute Ex.1: Output Run
  • 19. Code: Ex.2 Popup windows
  • 20. Code: Ex.2 String will be printed out on the msg box or popup window Popup window
  • 21. Execute Ex.2: Output
  • 23. JavaScript Data Types and Variables Variable is a facility for storing data. The current value of the variable is the data actually stored in the variable. Variable in JavaScript has name and value Declare a variable  give it a name ( ex. var x ) Initialize a variable  give it a value ( ex. x = 100) In order to use variable, they must be declared and initialized. Variable types are not important in JavaScript. They may be interchanged as necessary. This means that if a variable is a string one minute, it can be an integer the next. Declare  initialize  Call
  • 25. Code: Ex.3 Declaration of a variable
  • 26. Code: Ex.3 You can declare JavaScript variables with the var statement What? Huh
  • 27. Code: Ex.3 Initialization of the variable (name)
  • 28. Code: Ex.3 Prompt window prints out the string between quotations
  • 29. Code: Ex.3 writeln method prints the following in the browser: string + value of the variable name + string Hello + name value (input name) + Welcome to JavaScript Programming!
  • 31. Next Lecture Learning to Love JavaScript Prototypes Thank you, I hope you have enjoyed this presentation