SlideShare ist ein Scribd-Unternehmen logo
1 von 15
Chapter 4
Introduction to Javascript
Internet Programming (TAB1033)
mnibrahim@gmail.com
Objectives
By the end of this lecture, students will be able to:
â–ș grasp the basic concepts of javascript and DOM
â–ș describe the Client-Server Model
â–ș differentiate between client-side scripting and
server-side scripting
â–ș develop a simple javascript that involves simple
arithmetic operations
2 of 15
Agenda
â–ș Javascript is NOT Java programming language
â–ș What is javascript?
â–ș Why learn javascript?
â–ș Client- Server Model
â–ș Where Javascript Can Be Located?
â–ș Processing User Input, DOM.
â–ș e.g @the cashier
â–ș References
3 of 15
Javascript is NOT Java
Java
â–ș developed by SUN
â–ș a powerful OO
programming language .
â–ș involved compiling java
code into executable
applications.
â–ș Java programs created
for use in a web page is
called APPLET.
javascript
â–ș Designed by Netscape
â–ș A powerful OO scripting
language
â–ș Need an interpreter
(Browser dependent)
â–ș To enhance the
interactivity of web
pages
4 of 15
What is Javascript?
â–ș JavaScript is a scripting languages (lightweight)
â–ș It is usually embedded directly into an HTML doc
â–ș Is an interpreted language – browser dependent
â–ș JavaScript provides a programming language that
allows pages to escape from being static marked-
up information. – dynamic & interactive
â–ș JavaScript is used in millions of Web pages to add
functionality, validate forms, detect browsers,
and much more. It is free!!!
â–ș Pages that think.
5 of 15
Why learn JavaScript?
â–ș JavaScript gives HTML designers a
programming tool - HTML authors are normally
not programmers, but JavaScript is a scripting
language with a very simple syntax! Almost
anyone can put small "snippets" of code into their
HTML pages
â–ș JavaScript can put dynamic text into an HTML
page - A JavaScript statement like this:
document.write("<h1>" + name + "</h1>") can
write a variable text into an HTML page
6 of 15

Why learn JavaScript?
â–ș JavaScript can react to events - A JavaScript can
be set to execute when something happens, like
when a page has finished loading or when a user
clicks on an HTML element
â–ș JavaScript can read and write HTML elements -
A JavaScript can read and change the content of
an HTML element
â–ș JavaScript can be used to validate data - A
JavaScript can be used to validate form data
before it is submitted to a server.
7 of 15

Why learn JavaScript?
â–ș JavaScript can be used to detect the visitor's
browser - A JavaScript can be used to detect the
visitor's browser, and - depending on the browser
- load another page specifically designed for that
browser
â–ș JavaScript can be used to create cookies - A
JavaScript can be used to store and retrieve
information on the visitor's computer
8 of 15
The Client-Server Model
Client Side Scripting
9 of 15
...The Client-Server Model
Server Side Scripting
10 of 15
Where Javascript Can Be Located?
1. In the <body> section
 eg_js_01_body.html
2. In the <head> section
 eg_js_01_head.html
3. As an external file
 eg_js_01_external.html
11 of 15
Processing User Input
â–ș Javascript uses XHTML Documents Object Model
(DOM) to process user input
â–ș View a list of available objects
http://www.w3schools.com/js/js_obj_htmldom.asp
â–ș javascript event reference
http://www.w3schools.com/jsref/jsref_events.asp
â–ș Click eg_js_02.html to view an example of DOM
and onchange() event.
â–ș eg_js_01.html example of event, onclick().
12 of 15
Arithmetic Operator
Operator Description Example Result
+ Addition z = 5 + 4; z = 9
- Subtraction z = 5 – 4; z = 1
* Multiplication z = 5 * 4; z = 20
/ Division z = 5 / 4; z = 1.25
% Modulus
(remainder)
z = 5 % 4; z = 1
++ Increment z = 1;
y = ++z;
y = 2
-- Decrement z = 1;
y = --z;
y = 0
13 of 15
Simple Application @the Cashier
â–ș A working example. eg_cashier_js.html
14 of 15
References
â–ș http://www.w3schools.com/css/css_reference.asp
15 of 15

Weitere Àhnliche Inhalte

Was ist angesagt?

Course Document
Course DocumentCourse Document
Course DocumentClarence Ngoh
 
Introduction To JavaScript Ajax
Introduction To JavaScript AjaxIntroduction To JavaScript Ajax
Introduction To JavaScript AjaxReema
 
Learn JavaScript From Scratch
Learn JavaScript From ScratchLearn JavaScript From Scratch
Learn JavaScript From ScratchMohd Manzoor Ahmed
 
Calc shipping
Calc shippingCalc shipping
Calc shippingLAGirl
 
Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 2...
 Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 2... Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 2...
Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 2...WebStackAcademy
 
Build web server
Build web serverBuild web server
Build web serverChia-Hao Tsai
 
Upstate CSCI 450 jQuery
Upstate CSCI 450 jQueryUpstate CSCI 450 jQuery
Upstate CSCI 450 jQueryDanWooster1
 
Full stack java script development
Full stack java script developmentFull stack java script development
Full stack java script developmentTomislav Capan
 
Javascript debugging
Javascript debuggingJavascript debugging
Javascript debuggingaudiodog
 
NodeJs Intro - JavaScript Zagreb Meetup #1
NodeJs Intro - JavaScript Zagreb Meetup #1NodeJs Intro - JavaScript Zagreb Meetup #1
NodeJs Intro - JavaScript Zagreb Meetup #1Tomislav Capan
 
Dom(document object model)
Dom(document object model)Dom(document object model)
Dom(document object model)Partnered Health
 
Learn VBScript – Part 1 of 4
Learn VBScript – Part 1 of 4Learn VBScript – Part 1 of 4
Learn VBScript – Part 1 of 4Srinimf-Slides
 
1. introduction to java script
1. introduction to java script1. introduction to java script
1. introduction to java scriptAkhilesh Sinha
 
Ui automation
Ui automationUi automation
Ui automationtest test
 
introduction to the document object model- Dom chapter5
introduction to the document object model- Dom chapter5introduction to the document object model- Dom chapter5
introduction to the document object model- Dom chapter5FLYMAN TECHNOLOGY LIMITED
 
á„Œá…Ąá„‡á…Ąá„‰á…łá„á…łá„…á…”á†žá„á…ł êł”ë¶€ë„Œ 위한 책 소개
á„Œá…Ąá„‡á…Ąá„‰á…łá„á…łá„…á…”á†žá„á…ł êł”ë¶€ë„Œ 위한 책 ì†Œê°œá„Œá…Ąá„‡á…Ąá„‰á…łá„á…łá„…á…”á†žá„á…ł êł”ë¶€ë„Œ 위한 책 소개
á„Œá…Ąá„‡á…Ąá„‰á…łá„á…łá„…á…”á†žá„á…ł êł”ë¶€ë„Œ 위한 책 소개Ben Heo
 

Was ist angesagt? (17)

Course Document
Course DocumentCourse Document
Course Document
 
Introduction To JavaScript Ajax
Introduction To JavaScript AjaxIntroduction To JavaScript Ajax
Introduction To JavaScript Ajax
 
Learn JavaScript From Scratch
Learn JavaScript From ScratchLearn JavaScript From Scratch
Learn JavaScript From Scratch
 
Calc shipping
Calc shippingCalc shipping
Calc shipping
 
Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 2...
 Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 2... Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 2...
Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 2...
 
Build web server
Build web serverBuild web server
Build web server
 
Upstate CSCI 450 jQuery
Upstate CSCI 450 jQueryUpstate CSCI 450 jQuery
Upstate CSCI 450 jQuery
 
Full stack java script development
Full stack java script developmentFull stack java script development
Full stack java script development
 
Javascript debugging
Javascript debuggingJavascript debugging
Javascript debugging
 
NodeJs Intro - JavaScript Zagreb Meetup #1
NodeJs Intro - JavaScript Zagreb Meetup #1NodeJs Intro - JavaScript Zagreb Meetup #1
NodeJs Intro - JavaScript Zagreb Meetup #1
 
Coldfusion with Keith Diehl
Coldfusion with Keith DiehlColdfusion with Keith Diehl
Coldfusion with Keith Diehl
 
Dom(document object model)
Dom(document object model)Dom(document object model)
Dom(document object model)
 
Learn VBScript – Part 1 of 4
Learn VBScript – Part 1 of 4Learn VBScript – Part 1 of 4
Learn VBScript – Part 1 of 4
 
1. introduction to java script
1. introduction to java script1. introduction to java script
1. introduction to java script
 
Ui automation
Ui automationUi automation
Ui automation
 
introduction to the document object model- Dom chapter5
introduction to the document object model- Dom chapter5introduction to the document object model- Dom chapter5
introduction to the document object model- Dom chapter5
 
á„Œá…Ąá„‡á…Ąá„‰á…łá„á…łá„…á…”á†žá„á…ł êł”ë¶€ë„Œ 위한 책 소개
á„Œá…Ąá„‡á…Ąá„‰á…łá„á…łá„…á…”á†žá„á…ł êł”ë¶€ë„Œ 위한 책 ì†Œê°œá„Œá…Ąá„‡á…Ąá„‰á…łá„á…łá„…á…”á†žá„á…ł êł”ë¶€ë„Œ 위한 책 소개
á„Œá…Ąá„‡á…Ąá„‰á…łá„á…łá„…á…”á†žá„á…ł êł”ë¶€ë„Œ 위한 책 소개
 

Andere mochten auch

Knockout js
Knockout jsKnockout js
Knockout jsshobokshi
 
Knockout JS Development - a Quick Understanding
Knockout JS Development - a Quick UnderstandingKnockout JS Development - a Quick Understanding
Knockout JS Development - a Quick UnderstandingUdaya Kumar
 
Introduction to HTML
Introduction to HTMLIntroduction to HTML
Introduction to HTMLMeghan Frisco
 
(Fast) Introduction to HTML & CSS
(Fast) Introduction to HTML & CSS (Fast) Introduction to HTML & CSS
(Fast) Introduction to HTML & CSS Dave Kelly
 
Ejercicio final unidad 2
Ejercicio final unidad 2Ejercicio final unidad 2
Ejercicio final unidad 2Inmaculada Naranjo
 
Knockout (support slides for presentation)
Knockout (support slides for presentation)Knockout (support slides for presentation)
Knockout (support slides for presentation)Aymeric Gaurat-Apelli
 
Html introduction by ikram niaz
Html introduction by ikram niazHtml introduction by ikram niaz
Html introduction by ikram niazikram niaz
 
Knockout js
Knockout jsKnockout js
Knockout jshhassann
 
An introduction to KnockoutJS
An introduction to KnockoutJSAn introduction to KnockoutJS
An introduction to KnockoutJSmattbrailsford
 
01. session 01 introduction to html
01. session 01   introduction to html01. session 01   introduction to html
01. session 01 introduction to htmlPhĂșc Đỗ
 
Knockout Introduction
Knockout IntroductionKnockout Introduction
Knockout IntroductionSarvesh Kushwaha
 
HTML Introduction
HTML IntroductionHTML Introduction
HTML IntroductionHameda Hurmat
 
HTML Introduction
HTML IntroductionHTML Introduction
HTML Introductionc525600
 

Andere mochten auch (20)

Knockout js
Knockout jsKnockout js
Knockout js
 
Knockout JS Development - a Quick Understanding
Knockout JS Development - a Quick UnderstandingKnockout JS Development - a Quick Understanding
Knockout JS Development - a Quick Understanding
 
Introduction to HTML
Introduction to HTMLIntroduction to HTML
Introduction to HTML
 
(Fast) Introduction to HTML & CSS
(Fast) Introduction to HTML & CSS (Fast) Introduction to HTML & CSS
(Fast) Introduction to HTML & CSS
 
Ejercicio final unidad 2
Ejercicio final unidad 2Ejercicio final unidad 2
Ejercicio final unidad 2
 
Knockout.js
Knockout.jsKnockout.js
Knockout.js
 
Knockout js
Knockout jsKnockout js
Knockout js
 
Knockout (support slides for presentation)
Knockout (support slides for presentation)Knockout (support slides for presentation)
Knockout (support slides for presentation)
 
Html introduction by ikram niaz
Html introduction by ikram niazHtml introduction by ikram niaz
Html introduction by ikram niaz
 
Knockoutjs
KnockoutjsKnockoutjs
Knockoutjs
 
Knockout js (Dennis Haney)
Knockout js (Dennis Haney)Knockout js (Dennis Haney)
Knockout js (Dennis Haney)
 
Knockout js
Knockout jsKnockout js
Knockout js
 
An introduction to KnockoutJS
An introduction to KnockoutJSAn introduction to KnockoutJS
An introduction to KnockoutJS
 
Knockout js
Knockout jsKnockout js
Knockout js
 
01. session 01 introduction to html
01. session 01   introduction to html01. session 01   introduction to html
01. session 01 introduction to html
 
Knockout
KnockoutKnockout
Knockout
 
Knockout Introduction
Knockout IntroductionKnockout Introduction
Knockout Introduction
 
Introduction to HTML
Introduction to HTMLIntroduction to HTML
Introduction to HTML
 
HTML Introduction
HTML IntroductionHTML Introduction
HTML Introduction
 
HTML Introduction
HTML IntroductionHTML Introduction
HTML Introduction
 

Ähnlich wie Intro to JavaScript Chapter 4 - Objectives, Agenda, Definitions

JAVA SCRIPT
JAVA SCRIPTJAVA SCRIPT
JAVA SCRIPTGo4Guru
 
Java script Basic
Java script BasicJava script Basic
Java script BasicJaya Kumari
 
Unit 4 Java script.pptx
Unit 4 Java script.pptxUnit 4 Java script.pptx
Unit 4 Java script.pptxGangesh8
 
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
 
Java script
Java scriptJava script
Java scriptumesh patil
 
An Introduction to Ajax Programming
An Introduction to Ajax ProgrammingAn Introduction to Ajax Programming
An Introduction to Ajax Programminghchen1
 
Javascript - Ebook (A Quick Guide)
Javascript - Ebook (A Quick Guide)Javascript - Ebook (A Quick Guide)
Javascript - Ebook (A Quick Guide)sourav newatia
 
JS BASICS JAVA SCRIPT SCRIPTING
JS BASICS JAVA SCRIPT SCRIPTINGJS BASICS JAVA SCRIPT SCRIPTING
JS BASICS JAVA SCRIPT SCRIPTINGArulkumar
 
Java script by Act Academy
Java script by Act AcademyJava script by Act Academy
Java script by Act Academyactanimation
 
Iwt note(module 2)
Iwt note(module 2)Iwt note(module 2)
Iwt note(module 2)SANTOSH RATH
 
Session vii(java scriptbasics)
Session vii(java scriptbasics)Session vii(java scriptbasics)
Session vii(java scriptbasics)Shrijan Tiwari
 
8.-Javascript-report powerpoint presentation
8.-Javascript-report powerpoint presentation8.-Javascript-report powerpoint presentation
8.-Javascript-report powerpoint presentationJohnLagman3
 
JavaScripts & jQuery
JavaScripts & jQueryJavaScripts & jQuery
JavaScripts & jQueryAsanka Indrajith
 
06 Javascript
06 Javascript06 Javascript
06 JavascriptHerman Tolle
 
Java script Session No 1
Java script Session No 1Java script Session No 1
Java script Session No 1Saif Ullah Dar
 
Javascript
JavascriptJavascript
JavascriptNagarajan
 

Ähnlich wie Intro to JavaScript Chapter 4 - Objectives, Agenda, Definitions (20)

JAVA SCRIPT
JAVA SCRIPTJAVA SCRIPT
JAVA SCRIPT
 
Java script Basic
Java script BasicJava script Basic
Java script Basic
 
Javascript tutorial
Javascript tutorialJavascript tutorial
Javascript tutorial
 
Unit 4 Java script.pptx
Unit 4 Java script.pptxUnit 4 Java script.pptx
Unit 4 Java script.pptx
 
Basic Java script handouts for students
Basic Java script handouts for students Basic Java script handouts for students
Basic Java script handouts for students
 
JAVA SCRIPT
JAVA SCRIPTJAVA SCRIPT
JAVA SCRIPT
 
Java script
Java scriptJava script
Java script
 
Unit 4(it workshop)
Unit 4(it workshop)Unit 4(it workshop)
Unit 4(it workshop)
 
An Introduction to Ajax Programming
An Introduction to Ajax ProgrammingAn Introduction to Ajax Programming
An Introduction to Ajax Programming
 
Javascript - Ebook (A Quick Guide)
Javascript - Ebook (A Quick Guide)Javascript - Ebook (A Quick Guide)
Javascript - Ebook (A Quick Guide)
 
JS BASICS JAVA SCRIPT SCRIPTING
JS BASICS JAVA SCRIPT SCRIPTINGJS BASICS JAVA SCRIPT SCRIPTING
JS BASICS JAVA SCRIPT SCRIPTING
 
Java script by Act Academy
Java script by Act AcademyJava script by Act Academy
Java script by Act Academy
 
Iwt note(module 2)
Iwt note(module 2)Iwt note(module 2)
Iwt note(module 2)
 
Session vii(java scriptbasics)
Session vii(java scriptbasics)Session vii(java scriptbasics)
Session vii(java scriptbasics)
 
8.-Javascript-report powerpoint presentation
8.-Javascript-report powerpoint presentation8.-Javascript-report powerpoint presentation
8.-Javascript-report powerpoint presentation
 
Java scipt
Java sciptJava scipt
Java scipt
 
JavaScripts & jQuery
JavaScripts & jQueryJavaScripts & jQuery
JavaScripts & jQuery
 
06 Javascript
06 Javascript06 Javascript
06 Javascript
 
Java script Session No 1
Java script Session No 1Java script Session No 1
Java script Session No 1
 
Javascript
JavascriptJavascript
Javascript
 

Mehr von Firdaus Adib

Rule Based Architecture System
Rule Based Architecture SystemRule Based Architecture System
Rule Based Architecture SystemFirdaus Adib
 
Wireless Technology Proj spec
Wireless Technology Proj spec Wireless Technology Proj spec
Wireless Technology Proj spec Firdaus Adib
 
Corporate Ethics January 2010
Corporate Ethics January 2010Corporate Ethics January 2010
Corporate Ethics January 2010Firdaus Adib
 
Corporate Ethics July 2008
Corporate Ethics July 2008Corporate Ethics July 2008
Corporate Ethics July 2008Firdaus Adib
 
Final Paper UTP Web Development Application July 2008
Final Paper UTP Web Development Application July 2008Final Paper UTP Web Development Application July 2008
Final Paper UTP Web Development Application July 2008Firdaus Adib
 
Final Paper UTP Algorithm Data Structure July 2008
Final Paper UTP Algorithm Data Structure July 2008Final Paper UTP Algorithm Data Structure July 2008
Final Paper UTP Algorithm Data Structure July 2008Firdaus Adib
 
Final Paper UTP Web Development Application January 2010
Final Paper UTP Web Development Application January 2010Final Paper UTP Web Development Application January 2010
Final Paper UTP Web Development Application January 2010Firdaus Adib
 
Final Paper UTP Algorithm Data Structure January 2010
Final Paper UTP Algorithm Data Structure January 2010Final Paper UTP Algorithm Data Structure January 2010
Final Paper UTP Algorithm Data Structure January 2010Firdaus Adib
 
Final Paper UTP Web Development Application July 2009
Final Paper UTP Web Development Application July 2009Final Paper UTP Web Development Application July 2009
Final Paper UTP Web Development Application July 2009Firdaus Adib
 
PHP - Getting good with MySQL part II
 PHP - Getting good with MySQL part II PHP - Getting good with MySQL part II
PHP - Getting good with MySQL part IIFirdaus Adib
 
PHP - Getting good with MySQL part I
PHP - Getting good with MySQL part IPHP - Getting good with MySQL part I
PHP - Getting good with MySQL part IFirdaus Adib
 
Php - Getting good with session
Php - Getting good with sessionPhp - Getting good with session
Php - Getting good with sessionFirdaus Adib
 
PHP - Getting good with cookies
PHP - Getting good with cookiesPHP - Getting good with cookies
PHP - Getting good with cookiesFirdaus Adib
 
Javascript - Getting Good with Object
Javascript - Getting Good with ObjectJavascript - Getting Good with Object
Javascript - Getting Good with ObjectFirdaus Adib
 
Javascript - Getting Good with Loop and Array
Javascript - Getting Good with Loop and ArrayJavascript - Getting Good with Loop and Array
Javascript - Getting Good with Loop and ArrayFirdaus Adib
 
Additional exercise for apa references
Additional exercise for apa referencesAdditional exercise for apa references
Additional exercise for apa referencesFirdaus Adib
 
Chapter 2 summarising
Chapter 2 summarisingChapter 2 summarising
Chapter 2 summarisingFirdaus Adib
 
American psychological association (apa)
American psychological association (apa)American psychological association (apa)
American psychological association (apa)Firdaus Adib
 
Referencing and Citing
Referencing and CitingReferencing and Citing
Referencing and CitingFirdaus Adib
 
Chapter 2 paraphrasing
Chapter 2 paraphrasingChapter 2 paraphrasing
Chapter 2 paraphrasingFirdaus Adib
 

Mehr von Firdaus Adib (20)

Rule Based Architecture System
Rule Based Architecture SystemRule Based Architecture System
Rule Based Architecture System
 
Wireless Technology Proj spec
Wireless Technology Proj spec Wireless Technology Proj spec
Wireless Technology Proj spec
 
Corporate Ethics January 2010
Corporate Ethics January 2010Corporate Ethics January 2010
Corporate Ethics January 2010
 
Corporate Ethics July 2008
Corporate Ethics July 2008Corporate Ethics July 2008
Corporate Ethics July 2008
 
Final Paper UTP Web Development Application July 2008
Final Paper UTP Web Development Application July 2008Final Paper UTP Web Development Application July 2008
Final Paper UTP Web Development Application July 2008
 
Final Paper UTP Algorithm Data Structure July 2008
Final Paper UTP Algorithm Data Structure July 2008Final Paper UTP Algorithm Data Structure July 2008
Final Paper UTP Algorithm Data Structure July 2008
 
Final Paper UTP Web Development Application January 2010
Final Paper UTP Web Development Application January 2010Final Paper UTP Web Development Application January 2010
Final Paper UTP Web Development Application January 2010
 
Final Paper UTP Algorithm Data Structure January 2010
Final Paper UTP Algorithm Data Structure January 2010Final Paper UTP Algorithm Data Structure January 2010
Final Paper UTP Algorithm Data Structure January 2010
 
Final Paper UTP Web Development Application July 2009
Final Paper UTP Web Development Application July 2009Final Paper UTP Web Development Application July 2009
Final Paper UTP Web Development Application July 2009
 
PHP - Getting good with MySQL part II
 PHP - Getting good with MySQL part II PHP - Getting good with MySQL part II
PHP - Getting good with MySQL part II
 
PHP - Getting good with MySQL part I
PHP - Getting good with MySQL part IPHP - Getting good with MySQL part I
PHP - Getting good with MySQL part I
 
Php - Getting good with session
Php - Getting good with sessionPhp - Getting good with session
Php - Getting good with session
 
PHP - Getting good with cookies
PHP - Getting good with cookiesPHP - Getting good with cookies
PHP - Getting good with cookies
 
Javascript - Getting Good with Object
Javascript - Getting Good with ObjectJavascript - Getting Good with Object
Javascript - Getting Good with Object
 
Javascript - Getting Good with Loop and Array
Javascript - Getting Good with Loop and ArrayJavascript - Getting Good with Loop and Array
Javascript - Getting Good with Loop and Array
 
Additional exercise for apa references
Additional exercise for apa referencesAdditional exercise for apa references
Additional exercise for apa references
 
Chapter 2 summarising
Chapter 2 summarisingChapter 2 summarising
Chapter 2 summarising
 
American psychological association (apa)
American psychological association (apa)American psychological association (apa)
American psychological association (apa)
 
Referencing and Citing
Referencing and CitingReferencing and Citing
Referencing and Citing
 
Chapter 2 paraphrasing
Chapter 2 paraphrasingChapter 2 paraphrasing
Chapter 2 paraphrasing
 

KĂŒrzlich hochgeladen

TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel AraĂșjo
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 

KĂŒrzlich hochgeladen (20)

TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 

Intro to JavaScript Chapter 4 - Objectives, Agenda, Definitions

  • 1. Chapter 4 Introduction to Javascript Internet Programming (TAB1033) mnibrahim@gmail.com
  • 2. Objectives By the end of this lecture, students will be able to: â–ș grasp the basic concepts of javascript and DOM â–ș describe the Client-Server Model â–ș differentiate between client-side scripting and server-side scripting â–ș develop a simple javascript that involves simple arithmetic operations 2 of 15
  • 3. Agenda â–ș Javascript is NOT Java programming language â–ș What is javascript? â–ș Why learn javascript? â–ș Client- Server Model â–ș Where Javascript Can Be Located? â–ș Processing User Input, DOM. â–ș e.g @the cashier â–ș References 3 of 15
  • 4. Javascript is NOT Java Java â–ș developed by SUN â–ș a powerful OO programming language . â–ș involved compiling java code into executable applications. â–ș Java programs created for use in a web page is called APPLET. javascript â–ș Designed by Netscape â–ș A powerful OO scripting language â–ș Need an interpreter (Browser dependent) â–ș To enhance the interactivity of web pages 4 of 15
  • 5. What is Javascript? â–ș JavaScript is a scripting languages (lightweight) â–ș It is usually embedded directly into an HTML doc â–ș Is an interpreted language – browser dependent â–ș JavaScript provides a programming language that allows pages to escape from being static marked- up information. – dynamic & interactive â–ș JavaScript is used in millions of Web pages to add functionality, validate forms, detect browsers, and much more. It is free!!! â–ș Pages that think. 5 of 15
  • 6. Why learn JavaScript? â–ș JavaScript gives HTML designers a programming tool - HTML authors are normally not programmers, but JavaScript is a scripting language with a very simple syntax! Almost anyone can put small "snippets" of code into their HTML pages â–ș JavaScript can put dynamic text into an HTML page - A JavaScript statement like this: document.write("<h1>" + name + "</h1>") can write a variable text into an HTML page 6 of 15
  • 7. 
Why learn JavaScript? â–ș JavaScript can react to events - A JavaScript can be set to execute when something happens, like when a page has finished loading or when a user clicks on an HTML element â–ș JavaScript can read and write HTML elements - A JavaScript can read and change the content of an HTML element â–ș JavaScript can be used to validate data - A JavaScript can be used to validate form data before it is submitted to a server. 7 of 15
  • 8. 
Why learn JavaScript? â–ș JavaScript can be used to detect the visitor's browser - A JavaScript can be used to detect the visitor's browser, and - depending on the browser - load another page specifically designed for that browser â–ș JavaScript can be used to create cookies - A JavaScript can be used to store and retrieve information on the visitor's computer 8 of 15
  • 9. The Client-Server Model Client Side Scripting 9 of 15
  • 10. ...The Client-Server Model Server Side Scripting 10 of 15
  • 11. Where Javascript Can Be Located? 1. In the <body> section  eg_js_01_body.html 2. In the <head> section  eg_js_01_head.html 3. As an external file  eg_js_01_external.html 11 of 15
  • 12. Processing User Input â–ș Javascript uses XHTML Documents Object Model (DOM) to process user input â–ș View a list of available objects http://www.w3schools.com/js/js_obj_htmldom.asp â–ș javascript event reference http://www.w3schools.com/jsref/jsref_events.asp â–ș Click eg_js_02.html to view an example of DOM and onchange() event. â–ș eg_js_01.html example of event, onclick(). 12 of 15
  • 13. Arithmetic Operator Operator Description Example Result + Addition z = 5 + 4; z = 9 - Subtraction z = 5 – 4; z = 1 * Multiplication z = 5 * 4; z = 20 / Division z = 5 / 4; z = 1.25 % Modulus (remainder) z = 5 % 4; z = 1 ++ Increment z = 1; y = ++z; y = 2 -- Decrement z = 1; y = --z; y = 0 13 of 15
  • 14. Simple Application @the Cashier â–ș A working example. eg_cashier_js.html 14 of 15