SlideShare a Scribd company logo
JavaScriptWhy..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 PageOutlineWhy & What How
Why JavaScript?Enhances functionality and appearance of the web page.Client-side scriptingMakes pages more dynamic and interactiveEasy-to-useBuilt into web browsers and other applicationsOffering 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 furtherOne 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 Methodsdocument.writeln (ex.1)
Windows.alert (ex.2)input MethodsUsing variable (ex.3)Code: Ex.1                         (Output)Java Script at the first sight.
Code: Ex.1html opening tag
Code: Ex.1html opening tag Usually Java Scripts are included within the head tag, it also could be included in the body tag.
Code: Ex.1html 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 pageJavaScriptCode block
Code: Ex.1<script> tag: Indicate that the text is part of a script
Code: Ex.1type attribute: Specifies the type of file and the scripting language use.
Code: Ex.1<script> tag: Indicate that the text is part of a scripttype attribute: Specifies the type of file and the scripting language use.</script> End or Close Tag
Code: Ex.1A Method used to output a string onto the Browser
Code: Ex.1The 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:         OutputRun
Code: Ex.2
Code: Ex.2Popup windows
Code: Ex.2String will be printed out on the msg box or popup windowPopup window
Execute Ex.2:             Output
Execute Ex.2:
JavaScript Data Types and VariablesVariable 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 valueDeclare 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.3Declaration of a variable
Code: Ex.3You can declare JavaScript variables with the var statementWhat? Huh
Code: Ex.3Initialization of the variable (name)
Code: Ex.3Prompt window prints out the string between quotations
Code: Ex.3writeln 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 PrototypesThank you, I hope you have enjoyed this presentation

More Related Content

PPT
Introduction to Javascript
Amit Tyagi
 
PPTX
JSON: The Basics
Jeff Fox
 
PPTX
Javascript
Nagarajan
 
PDF
JavaScript Tutorial For Beginners | JavaScript Training | JavaScript Programm...
Edureka!
 
PPTX
Lab #2: Introduction to Javascript
Walid Ashraf
 
PPTX
jQuery
Dileep Mishra
 
PPT
Abstract class in java
Lovely Professional University
 
PDF
Javascript basics
shreesenthil
 
Introduction to Javascript
Amit Tyagi
 
JSON: The Basics
Jeff Fox
 
Javascript
Nagarajan
 
JavaScript Tutorial For Beginners | JavaScript Training | JavaScript Programm...
Edureka!
 
Lab #2: Introduction to Javascript
Walid Ashraf
 
Abstract class in java
Lovely Professional University
 
Javascript basics
shreesenthil
 

What's hot (20)

PPT
JavaScript - An Introduction
Manvendra Singh
 
PPT
Intro to web services
Neil Ghosh
 
PPTX
jQuery PPT
Dominic Arrojado
 
PDF
Angular - Chapter 4 - Data and Event Handling
WebStackAcademy
 
PPT
Java script -23jan2015
Sasidhar Kothuru
 
PDF
jQuery for beginners
Arulmurugan Rajaraman
 
PPTX
Angular
khoado2002
 
PDF
PHP Loops and PHP Forms
M.Zalmai Rahmani
 
PPT
Java Servlets
BG Java EE Course
 
PPT
Css Ppt
Hema Prasanth
 
PPT
Generics in java
suraj pandey
 
PPTX
Introduction to JavaScript Basics.
Hassan Ahmed Baig - Web Developer
 
PPTX
Json
Steve Fort
 
PPT
Java IO Package and Streams
babak danyal
 
PPT
Introduction to JavaScript
Andres Baravalle
 
PPTX
Introduction to java
Saba Ameer
 
PPT
JavaScript: Events Handling
Yuriy Bezgachnyuk
 
PPSX
Javascript variables and datatypes
Varun C M
 
PDF
Basics of JavaScript
Bala Narayanan
 
PPTX
Java script
Sadeek Mohammed
 
JavaScript - An Introduction
Manvendra Singh
 
Intro to web services
Neil Ghosh
 
jQuery PPT
Dominic Arrojado
 
Angular - Chapter 4 - Data and Event Handling
WebStackAcademy
 
Java script -23jan2015
Sasidhar Kothuru
 
jQuery for beginners
Arulmurugan Rajaraman
 
Angular
khoado2002
 
PHP Loops and PHP Forms
M.Zalmai Rahmani
 
Java Servlets
BG Java EE Course
 
Css Ppt
Hema Prasanth
 
Generics in java
suraj pandey
 
Introduction to JavaScript Basics.
Hassan Ahmed Baig - Web Developer
 
Java IO Package and Streams
babak danyal
 
Introduction to JavaScript
Andres Baravalle
 
Introduction to java
Saba Ameer
 
JavaScript: Events Handling
Yuriy Bezgachnyuk
 
Javascript variables and datatypes
Varun C M
 
Basics of JavaScript
Bala Narayanan
 
Java script
Sadeek Mohammed
 
Ad

Viewers also liked (15)

DOCX
Oracle docs rmi applications
Biswabrata Banerjee
 
PPT
Deploying java beans in jsp
Priyanka Pradhan
 
PPT
Java script final presentation
Adhoura Academy
 
DOC
Servlets and jsp pages best practices
ejjavies
 
DOC
JSP Scope variable And Data Sharing
vikram singh
 
DOC
Javascript Question
Vinodkumar Saravana Chandrasekar
 
DOC
Java Servlets & JSP
Manjunatha RK
 
PDF
Jdbc 1
Mukesh Tekwani
 
PDF
21 Essential JavaScript Interview Questions
Arc & Codementor
 
DOC
Ad java prac sol set
Iram Ramrajkar
 
DOCX
Java PRACTICAL file
RACHIT_GUPTA
 
PDF
Advanced Java Practical File
Soumya Behera
 
DOCX
Java codes
Hussain Sherwani
 
PDF
UGC net exam notes
Zenitheducation
 
PDF
Ask the XPages Experts
Teamstudio
 
Oracle docs rmi applications
Biswabrata Banerjee
 
Deploying java beans in jsp
Priyanka Pradhan
 
Java script final presentation
Adhoura Academy
 
Servlets and jsp pages best practices
ejjavies
 
JSP Scope variable And Data Sharing
vikram singh
 
Java Servlets & JSP
Manjunatha RK
 
21 Essential JavaScript Interview Questions
Arc & Codementor
 
Ad java prac sol set
Iram Ramrajkar
 
Java PRACTICAL file
RACHIT_GUPTA
 
Advanced Java Practical File
Soumya Behera
 
Java codes
Hussain Sherwani
 
UGC net exam notes
Zenitheducation
 
Ask the XPages Experts
Teamstudio
 
Ad

Similar to Java Script (20)

PPTX
HNDIT1022 Week 08, 09 10 Theory web .pptx
IsuriUmayangana
 
PPTX
Lecture 5 javascript
Mujtaba Haider
 
PDF
javascriptPresentation.pdf
wildcat9335
 
PPTX
04-JS.pptx
RazanMazen4
 
PPTX
04-JS.pptx
RazanMazen4
 
PPTX
04-JS.pptx
RazanMazen4
 
PPTX
Web programming
Leo Mark Villar
 
PDF
CS8651- Unit 2 - JS.internet programming paper anna university -2017 regulation
amrashbhanuabdul
 
PPT
Introduction to Java Scripting
fantasticdigitaltools
 
DOC
2javascript web programming with JAVA script
umardanjumamaiwada
 
DOC
Basics java scripts
ch samaram
 
PDF
java-scriptcdvcx vnbm,azsdfghjkml;sxdfcgmndxfcgvhb nmfctgvbhjnm ,cfgvb nm,xc ...
kavigamage62
 
PPTX
Java script Basic
Jaya Kumari
 
PPTX
Learning space presentation1 learn Java script
engmk83
 
PPT
Javascript survival for CSBN Sophomores
Andy de Vera
 
PPTX
js.pptx
SuhaibKhan62
 
PDF
8 introduction to_java_script
Vijay Kalyan
 
PPTX
Powerpoint about JavaScript presentation
XaiMaeChanelleSopsop
 
PDF
Basic JavaScript Tutorial
DHTMLExtreme
 
HNDIT1022 Week 08, 09 10 Theory web .pptx
IsuriUmayangana
 
Lecture 5 javascript
Mujtaba Haider
 
javascriptPresentation.pdf
wildcat9335
 
04-JS.pptx
RazanMazen4
 
04-JS.pptx
RazanMazen4
 
04-JS.pptx
RazanMazen4
 
Web programming
Leo Mark Villar
 
CS8651- Unit 2 - JS.internet programming paper anna university -2017 regulation
amrashbhanuabdul
 
Introduction to Java Scripting
fantasticdigitaltools
 
2javascript web programming with JAVA script
umardanjumamaiwada
 
Basics java scripts
ch samaram
 
java-scriptcdvcx vnbm,azsdfghjkml;sxdfcgmndxfcgvhb nmfctgvbhjnm ,cfgvb nm,xc ...
kavigamage62
 
Java script Basic
Jaya Kumari
 
Learning space presentation1 learn Java script
engmk83
 
Javascript survival for CSBN Sophomores
Andy de Vera
 
js.pptx
SuhaibKhan62
 
8 introduction to_java_script
Vijay Kalyan
 
Powerpoint about JavaScript presentation
XaiMaeChanelleSopsop
 
Basic JavaScript Tutorial
DHTMLExtreme
 

Recently uploaded (20)

PDF
Landforms and landscapes data surprise preview
jpinnuck
 
PPTX
How to Manage Global Discount in Odoo 18 POS
Celine George
 
PDF
Types of Literary Text: Poetry and Prose
kaelandreabibit
 
PPT
Python Programming Unit II Control Statements.ppt
CUO VEERANAN VEERANAN
 
PPTX
PREVENTIVE PEDIATRIC. pptx
AneetaSharma15
 
PDF
Phylum Arthropoda: Characteristics and Classification, Entomology Lecture
Miraj Khan
 
PPTX
Care of patients with elImination deviation.pptx
AneetaSharma15
 
PPTX
Congenital Hypothyroidism pptx
AneetaSharma15
 
DOCX
UPPER GASTRO INTESTINAL DISORDER.docx
BANDITA PATRA
 
PDF
What is CFA?? Complete Guide to the Chartered Financial Analyst Program
sp4989653
 
PDF
Electricity-Magnetic-and-Heating-Effects 4th Chapter/8th-science-curiosity.pd...
Sandeep Swamy
 
PPTX
Nursing Management of Patients with Disorders of Ear, Nose, and Throat (ENT) ...
RAKESH SAJJAN
 
PPTX
TEF & EA Bsc Nursing 5th sem.....BBBpptx
AneetaSharma15
 
PPTX
CARE OF UNCONSCIOUS PATIENTS .pptx
AneetaSharma15
 
PPTX
Open Quiz Monsoon Mind Game Final Set.pptx
Sourav Kr Podder
 
PPTX
PPTs-The Rise of Empiresghhhhhhhh (1).pptx
academysrusti114
 
PDF
High Ground Student Revision Booklet Preview
jpinnuck
 
PDF
2.Reshaping-Indias-Political-Map.ppt/pdf/8th class social science Exploring S...
Sandeep Swamy
 
PPTX
Introduction and Scope of Bichemistry.pptx
shantiyogi
 
PPTX
Odoo 18 Sales_ Managing Quotation Validity
Celine George
 
Landforms and landscapes data surprise preview
jpinnuck
 
How to Manage Global Discount in Odoo 18 POS
Celine George
 
Types of Literary Text: Poetry and Prose
kaelandreabibit
 
Python Programming Unit II Control Statements.ppt
CUO VEERANAN VEERANAN
 
PREVENTIVE PEDIATRIC. pptx
AneetaSharma15
 
Phylum Arthropoda: Characteristics and Classification, Entomology Lecture
Miraj Khan
 
Care of patients with elImination deviation.pptx
AneetaSharma15
 
Congenital Hypothyroidism pptx
AneetaSharma15
 
UPPER GASTRO INTESTINAL DISORDER.docx
BANDITA PATRA
 
What is CFA?? Complete Guide to the Chartered Financial Analyst Program
sp4989653
 
Electricity-Magnetic-and-Heating-Effects 4th Chapter/8th-science-curiosity.pd...
Sandeep Swamy
 
Nursing Management of Patients with Disorders of Ear, Nose, and Throat (ENT) ...
RAKESH SAJJAN
 
TEF & EA Bsc Nursing 5th sem.....BBBpptx
AneetaSharma15
 
CARE OF UNCONSCIOUS PATIENTS .pptx
AneetaSharma15
 
Open Quiz Monsoon Mind Game Final Set.pptx
Sourav Kr Podder
 
PPTs-The Rise of Empiresghhhhhhhh (1).pptx
academysrusti114
 
High Ground Student Revision Booklet Preview
jpinnuck
 
2.Reshaping-Indias-Political-Map.ppt/pdf/8th class social science Exploring S...
Sandeep Swamy
 
Introduction and Scope of Bichemistry.pptx
shantiyogi
 
Odoo 18 Sales_ Managing Quotation Validity
Celine George
 

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 PageOutlineWhy & What How
  • 3. Why JavaScript?Enhances functionality and appearance of the web page.Client-side scriptingMakes pages more dynamic and interactiveEasy-to-useBuilt into web browsers and other applicationsOffering 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. Before going any furtherOne 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 Methodsdocument.writeln (ex.1)
  • 8. Windows.alert (ex.2)input MethodsUsing variable (ex.3)Code: Ex.1 (Output)Java Script at the first sight.
  • 10. Code: Ex.1html opening tag Usually Java Scripts are included within the head tag, it also could be included in the body tag.
  • 11. Code: Ex.1html 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 pageJavaScriptCode block
  • 12. Code: Ex.1<script> tag: Indicate that the text is part of a script
  • 13. Code: Ex.1type 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 scripttype attribute: Specifies the type of file and the scripting language use.</script> End or Close Tag
  • 15. Code: Ex.1A Method used to output a string onto the Browser
  • 16. Code: Ex.1The 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: OutputRun
  • 20. Code: Ex.2String will be printed out on the msg box or popup windowPopup window
  • 21. Execute Ex.2: Output
  • 23. JavaScript Data Types and VariablesVariable 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 valueDeclare 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
  • 26. Code: Ex.3You can declare JavaScript variables with the var statementWhat? Huh
  • 27. Code: Ex.3Initialization of the variable (name)
  • 28. Code: Ex.3Prompt window prints out the string between quotations
  • 29. Code: Ex.3writeln 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 PrototypesThank you, I hope you have enjoyed this presentation