SlideShare a Scribd company logo
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

More Related Content

What's hot

Java script
Java scriptJava script
Java script
Shyam Khant
 
Basics of JavaScript
Basics of JavaScriptBasics of JavaScript
Basics of JavaScript
Bala Narayanan
 
Javascript
JavascriptJavascript
Javascript
Nagarajan
 
JavaScript - Chapter 12 - Document Object Model
  JavaScript - Chapter 12 - Document Object Model  JavaScript - Chapter 12 - Document Object Model
JavaScript - Chapter 12 - Document Object Model
WebStackAcademy
 
Java script
Java scriptJava script
Java script
reddivarihareesh
 
Introduction to Javascript
Introduction to JavascriptIntroduction to Javascript
Introduction to Javascript
Amit Tyagi
 
Javascript
JavascriptJavascript
Javascript
Manav Prasad
 
JavaScript & Dom Manipulation
JavaScript & Dom ManipulationJavaScript & Dom Manipulation
JavaScript & Dom Manipulation
Mohammed Arif
 
Javascript 101
Javascript 101Javascript 101
Javascript 101
Shlomi Komemi
 
Html5 tutorial for beginners
Html5 tutorial for beginnersHtml5 tutorial for beginners
Html5 tutorial for beginners
Singsys Pte Ltd
 
Css selectors
Css selectorsCss selectors
Css selectors
Parth Trivedi
 
HTML Forms
HTML FormsHTML Forms
HTML Forms
Ravinder Kamboj
 
Php forms
Php formsPhp forms
Php forms
Anne Lee
 
Javascript
JavascriptJavascript
Javascript
mussawir20
 
3. Java Script
3. Java Script3. Java Script
3. Java Script
Jalpesh Vasa
 
An Introduction to the DOM
An Introduction to the DOMAn Introduction to the DOM
An Introduction to the DOM
Mindy McAdams
 
JavaScript - An Introduction
JavaScript - An IntroductionJavaScript - An Introduction
JavaScript - An Introduction
Manvendra Singh
 
Dynamic HTML (DHTML)
Dynamic HTML (DHTML)Dynamic HTML (DHTML)
Dynamic HTML (DHTML)
Himanshu Kumar
 

What's hot (20)

Java script
Java scriptJava script
Java script
 
Basics of JavaScript
Basics of JavaScriptBasics of JavaScript
Basics of JavaScript
 
Javascript
JavascriptJavascript
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
JavascriptJavascript
Javascript
 
JavaScript & Dom Manipulation
JavaScript & Dom ManipulationJavaScript & Dom Manipulation
JavaScript & Dom Manipulation
 
Javascript 101
Javascript 101Javascript 101
Javascript 101
 
Html5 tutorial for beginners
Html5 tutorial for beginnersHtml5 tutorial for beginners
Html5 tutorial for beginners
 
Css selectors
Css selectorsCss selectors
Css selectors
 
HTML Forms
HTML FormsHTML Forms
HTML Forms
 
CSS
CSSCSS
CSS
 
Php forms
Php formsPhp forms
Php forms
 
Javascript
JavascriptJavascript
Javascript
 
3. Java Script
3. Java Script3. Java Script
3. Java Script
 
An Introduction to the DOM
An Introduction to the DOMAn Introduction to the DOM
An Introduction to the DOM
 
Json
JsonJson
Json
 
JavaScript - An Introduction
JavaScript - An IntroductionJavaScript - An Introduction
JavaScript - An Introduction
 
Dynamic HTML (DHTML)
Dynamic HTML (DHTML)Dynamic HTML (DHTML)
Dynamic HTML (DHTML)
 

Viewers also liked

Deploying java beans in jsp
Deploying java beans in jspDeploying java beans in jsp
Deploying java beans in jsp
Priyanka 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
 
Javascript Question
Javascript QuestionJavascript Question
21 Essential JavaScript Interview Questions
21 Essential JavaScript Interview Questions21 Essential JavaScript Interview Questions
21 Essential JavaScript Interview Questions
Arc & Codementor
 
Ad java prac sol set
Ad java prac sol setAd java prac sol set
Ad java prac sol set
Iram Ramrajkar
 
Java PRACTICAL file
Java PRACTICAL fileJava PRACTICAL file
Java PRACTICAL file
RACHIT_GUPTA
 
Advanced Java Practical File
Advanced Java Practical FileAdvanced Java Practical File
Advanced Java Practical FileSoumya Behera
 
Java codes
Java codesJava codes
Java codes
Hussain Sherwani
 
UGC net exam notes
UGC net exam notesUGC net exam notes
UGC net exam notes
Zenitheducation
 
Ask the XPages Experts
Ask the XPages ExpertsAsk the XPages Experts
Ask the XPages Experts
Teamstudio
 

Viewers also liked (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
 

Similar to Java Script

Basic JavaScript Tutorial
Basic JavaScript TutorialBasic JavaScript Tutorial
Basic JavaScript Tutorial
DHTMLExtreme
 
CSC PPT 12.pptx
CSC PPT 12.pptxCSC PPT 12.pptx
CSC PPT 12.pptx
DrRavneetSingh
 
Javascript tutorial
Javascript tutorialJavascript tutorial
Javascript tutorial
Avinash Malhotra
 
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 presentation
JohnLagman3
 
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
 
Web programming
Web programmingWeb programming
Web programming
Leo Mark Villar
 
Client side scripting using Javascript
Client side scripting using JavascriptClient side scripting using Javascript
Client side scripting using Javascript
Bansari Shah
 
INTRODUCTION TO CLIENT SIDE PROGRAMMING
INTRODUCTION TO CLIENT SIDE PROGRAMMINGINTRODUCTION TO CLIENT SIDE PROGRAMMING
INTRODUCTION TO CLIENT SIDE PROGRAMMING
Prof Ansari
 
JavaScript: Implementations And Applications
JavaScript: Implementations And ApplicationsJavaScript: Implementations And Applications
JavaScript: Implementations And Applications
Pragya Pai
 
Java scipt
Java sciptJava scipt
JAVA SCRIPT
JAVA SCRIPTJAVA SCRIPT
JAVA SCRIPT
Go4Guru
 
Introduction to Javascript
Introduction to JavascriptIntroduction to Javascript
Introduction to Javascript
ambuj pathak
 
Java Script - A New Look
Java Script - A New LookJava Script - A New Look
Java Script - A New Lookrumsan
 
Advanced Qtp Book
Advanced Qtp BookAdvanced Qtp Book
Advanced Qtp Book
G.C Reddy
 

Similar to Java Script (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
 
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: 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
 
Java Script - A New Look
Java Script - A New LookJava Script - A New Look
Java Script - A New Look
 
Advanced Qtp Book
Advanced Qtp BookAdvanced Qtp Book
Advanced Qtp Book
 

Recently uploaded

Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
Jean Carlos Nunes Paixão
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
SACHIN R KONDAGURI
 
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Atul Kumar Singh
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
Delapenabediema
 
678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf
CarlosHernanMontoyab2
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
Thiyagu K
 
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdfAdversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Po-Chuan Chen
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
GeoBlogs
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
Jisc
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
joachimlavalley1
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
Celine George
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
vaibhavrinwa19
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
Jisc
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
Levi Shapiro
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
Anna Sz.
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
Nguyen Thanh Tu Collection
 
Honest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptxHonest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptx
timhan337
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Thiyagu K
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
Jisc
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
EugeneSaldivar
 

Recently uploaded (20)

Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
 
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 
678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
 
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdfAdversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
 
Honest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptxHonest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptx
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
 

Java Script

  • 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