SlideShare a Scribd company logo
BS (Hons.) Information Technology
Semester-V
Web Engineering
Javascript
Submitted By:
Mufeed Abbas (1026)
Submitted To:
Mr. Inam ul Haq
UNIVERSITY OF EDUCATION, LAHORE
OKARA-CAMPUS
Dated: October 22, 2015
Introduction
 What is it?
 How does it work?
 What is Java?
 Learning JavaScript
 JavaScript Statements
 JavaScript and HTML forms
What is JavaScript?
 Browsers have limited functionality
 Text, images, tables, frames
 JavaScript allows for interactivity
 Browser/page manipulation
 Reacting to user actions
 A type of programming language
 Easy to learn
 Developed by Netscape
 Now a standard exists –
www.ecma-
international.org/publications/
standards/ECMA-262.HTM
JavaScript Allows Interactivity
 Improve appearance
 Especially graphics
 Visual feedback
 Site navigation
 Perform calculations
 Validation of input
 Other technologies
How Does It Work?
 Embedded within HTML page
 View source
 Executes on client
 Fast, no connection needed once loaded
 Simple programming statements combined with HTML tags
 Interpreted (not compiled)
 No special tools required
What is Java?
 Totally different
 A full programming language
 Much harder!
 A compiled language
 Independent of the web
 Sometimes used together
Learning JavaScript
 Special syntax to learn
 Learn the basics and then use other people's
(lots of free sites)
 Write it in a text editor, view results in browser
 You need to revise your HTML
 You need patience and good eyesight!
JavaScript Statements
<html>
<head><title>My Page</title></head>
<body>
<script language="JavaScript">
document.write('This is my first →
JavaScript Page');
</script>
</body>
</html>
JavaScript Statements
<html>
<head><title>My Page</title></head>
<body>
<script language=“JavaScript">
document.write('<h1>This is my first →
JavaScript Page</h1>');
</script>
</body>
</html>
JavaScript Statements
<html>
<head><title>My Page</title></head>
<body>
<p>
<a href="myfile.html">My Page</a>
<br />
<a href="myfile.html"
onMouseover="window.alert('Hello');">
My Page</A>
</p>
</body>
</html>
Example Statements
<script language="JavaScript">
window.prompt('Enter your name:','');
</script>
<form>
<input type="button" Value="Press"
onClick="window.alert('Hello');">
</form>
HTML Forms and JavaScript
 JavaScript is very good at processing user input in the web
browser
 HTML <form> elements receive input
 Forms and form elements have unique names
 Each unique element can be identified
 Uses JavaScript Document Object Model (DOM)

More Related Content

What's hot (20)

Modern UI Architecture_ Trends and Technologies in Web Development
Modern UI Architecture_ Trends and Technologies in Web DevelopmentModern UI Architecture_ Trends and Technologies in Web Development
Modern UI Architecture_ Trends and Technologies in Web Development
Suresh Patidar
 
Accessmonkey: Scripting Accessibility
Accessmonkey:  Scripting AccessibilityAccessmonkey:  Scripting Accessibility
Accessmonkey: Scripting Accessibility
Jeffrey Bigham
 
Single Page Application presentation
Single Page Application presentationSingle Page Application presentation
Single Page Application presentation
John Staveley
 
Cv nguyen cong trung
Cv nguyen cong trungCv nguyen cong trung
Cv nguyen cong trung
CongTrung Vnit
 
The Web on Windows
The Web on WindowsThe Web on Windows
The Web on Windows
Josh Lane
 
Fatoumatta bah resume.docx2
Fatoumatta bah resume.docx2Fatoumatta bah resume.docx2
Fatoumatta bah resume.docx2
fatoumatta bah
 
Introduction to Web development
Introduction to Web developmentIntroduction to Web development
Introduction to Web development
Md. Shafiuzzaman Hira
 
How to become a frontend developer by duomly.com
How to become a frontend developer by duomly.comHow to become a frontend developer by duomly.com
How to become a frontend developer by duomly.com
🖥 Anna Danilec
 
ADVANCED WEB DEVELOPMENT-Arrowsoft
ADVANCED WEB DEVELOPMENT-ArrowsoftADVANCED WEB DEVELOPMENT-Arrowsoft
ADVANCED WEB DEVELOPMENT-Arrowsoft
Arrowsoft
 
Web Development
Web DevelopmentWeb Development
Web Development
Aditya Raman
 
Introduction to Web Development Career
Introduction to Web Development CareerIntroduction to Web Development Career
Introduction to Web Development Career
Eunus Hosen
 
Use of different programs
Use of different programsUse of different programs
Use of different programs
blanka98
 
Engaging Rich Internet Applications using Flex
Engaging Rich Internet Applications using FlexEngaging Rich Internet Applications using Flex
Engaging Rich Internet Applications using Flex
Muhammad Nasr
 
Top java script frameworks ppt
Top java script frameworks pptTop java script frameworks ppt
Top java script frameworks ppt
Omkarsoft Bangalore
 
CV Template
CV TemplateCV Template
CV Template
Hoàng Huy
 
Web Development and Web Development technologies - Temitayo Fadojutimi
Web Development and Web Development technologies - Temitayo FadojutimiWeb Development and Web Development technologies - Temitayo Fadojutimi
Web Development and Web Development technologies - Temitayo Fadojutimi
Temitayo Fadojutimi
 
1-01: Introduction To Web Development
1-01: Introduction To  Web  Development1-01: Introduction To  Web  Development
1-01: Introduction To Web Development
apnwebdev
 
Java script introduction
Java script introductionJava script introduction
Java script introduction
Jesus Obenita Jr.
 
Pole web pp
Pole web ppPole web pp
Pole web pp
Mustapha Ben Chaaben
 
Recommendation letter for Mustafa Shikora
Recommendation letter for Mustafa ShikoraRecommendation letter for Mustafa Shikora
Recommendation letter for Mustafa Shikora
Mustafa Shikora
 
Modern UI Architecture_ Trends and Technologies in Web Development
Modern UI Architecture_ Trends and Technologies in Web DevelopmentModern UI Architecture_ Trends and Technologies in Web Development
Modern UI Architecture_ Trends and Technologies in Web Development
Suresh Patidar
 
Accessmonkey: Scripting Accessibility
Accessmonkey:  Scripting AccessibilityAccessmonkey:  Scripting Accessibility
Accessmonkey: Scripting Accessibility
Jeffrey Bigham
 
Single Page Application presentation
Single Page Application presentationSingle Page Application presentation
Single Page Application presentation
John Staveley
 
The Web on Windows
The Web on WindowsThe Web on Windows
The Web on Windows
Josh Lane
 
Fatoumatta bah resume.docx2
Fatoumatta bah resume.docx2Fatoumatta bah resume.docx2
Fatoumatta bah resume.docx2
fatoumatta bah
 
How to become a frontend developer by duomly.com
How to become a frontend developer by duomly.comHow to become a frontend developer by duomly.com
How to become a frontend developer by duomly.com
🖥 Anna Danilec
 
ADVANCED WEB DEVELOPMENT-Arrowsoft
ADVANCED WEB DEVELOPMENT-ArrowsoftADVANCED WEB DEVELOPMENT-Arrowsoft
ADVANCED WEB DEVELOPMENT-Arrowsoft
Arrowsoft
 
Introduction to Web Development Career
Introduction to Web Development CareerIntroduction to Web Development Career
Introduction to Web Development Career
Eunus Hosen
 
Use of different programs
Use of different programsUse of different programs
Use of different programs
blanka98
 
Engaging Rich Internet Applications using Flex
Engaging Rich Internet Applications using FlexEngaging Rich Internet Applications using Flex
Engaging Rich Internet Applications using Flex
Muhammad Nasr
 
Web Development and Web Development technologies - Temitayo Fadojutimi
Web Development and Web Development technologies - Temitayo FadojutimiWeb Development and Web Development technologies - Temitayo Fadojutimi
Web Development and Web Development technologies - Temitayo Fadojutimi
Temitayo Fadojutimi
 
1-01: Introduction To Web Development
1-01: Introduction To  Web  Development1-01: Introduction To  Web  Development
1-01: Introduction To Web Development
apnwebdev
 
Recommendation letter for Mustafa Shikora
Recommendation letter for Mustafa ShikoraRecommendation letter for Mustafa Shikora
Recommendation letter for Mustafa Shikora
Mustafa Shikora
 

Similar to Java Script Introduction (20)

emerging
emergingemerging
emerging
tutorialsruby
 
emerging
emergingemerging
emerging
tutorialsruby
 
Front End Development | Introduction
Front End Development | IntroductionFront End Development | Introduction
Front End Development | Introduction
JohnTaieb
 
Web development concepts using microsoft technologies
Web development concepts using microsoft technologiesWeb development concepts using microsoft technologies
Web development concepts using microsoft technologies
Hosam Kamel
 
Full Stack development made on React JS Project
Full Stack development made on React JS ProjectFull Stack development made on React JS Project
Full Stack development made on React JS Project
AmanKoli6
 
INTRODUCTION.docx
INTRODUCTION.docxINTRODUCTION.docx
INTRODUCTION.docx
KaiSane1
 
Net training in bhubaneswar
Net training in bhubaneswar Net training in bhubaneswar
Net training in bhubaneswar
litbbsr
 
Front-End Web Development
Front-End Web DevelopmentFront-End Web Development
Front-End Web Development
Yash Sati
 
LATEST_TRENDS_IN_WEBSITE_DEVELOPMENT.pptx
LATEST_TRENDS_IN_WEBSITE_DEVELOPMENT.pptxLATEST_TRENDS_IN_WEBSITE_DEVELOPMENT.pptx
LATEST_TRENDS_IN_WEBSITE_DEVELOPMENT.pptx
chitrachauhan21
 
A Web development ppt seminar report.pptx
A Web development ppt seminar report.pptxA Web development ppt seminar report.pptx
A Web development ppt seminar report.pptx
SumitSen65
 
Ajax Abuse Todcon2008
Ajax Abuse Todcon2008Ajax Abuse Todcon2008
Ajax Abuse Todcon2008
Jesse Rodgers
 
LAMP is so yesterday, MEAN is so tomorrow! :)
LAMP is so yesterday, MEAN is so tomorrow! :) LAMP is so yesterday, MEAN is so tomorrow! :)
LAMP is so yesterday, MEAN is so tomorrow! :)
Sascha Sambale
 
Directions on microsoft_web_and_cloud_development
Directions on microsoft_web_and_cloud_developmentDirections on microsoft_web_and_cloud_development
Directions on microsoft_web_and_cloud_development
Takeshi Shinmura
 
front end presentation ppt for front end development with sample project
front end presentation ppt for front end development with sample projectfront end presentation ppt for front end development with sample project
front end presentation ppt for front end development with sample project
401ChaitanyaBajjuri
 
Dot Net Full Stack course in Hyderabad in tealanga
Dot Net Full Stack course in Hyderabad in tealangaDot Net Full Stack course in Hyderabad in tealanga
Dot Net Full Stack course in Hyderabad in tealanga
harithastoitechs
 
Buzzword, How'd They Build That?
Buzzword, How'd They Build That?Buzzword, How'd They Build That?
Buzzword, How'd They Build That?
dcoletta
 
Web Browser Accessibility using Open-Source Software
Web Browser Accessibility using Open-Source SoftwareWeb Browser Accessibility using Open-Source Software
Web Browser Accessibility using Open-Source Software
zeljkoobrenovic
 
Single page apps a bleeding edge new concept or a revived old one?
Single page apps   a bleeding edge new concept or a revived old one?Single page apps   a bleeding edge new concept or a revived old one?
Single page apps a bleeding edge new concept or a revived old one?
Omer Dawelbeit
 
Lec-1-2.pptx
Lec-1-2.pptxLec-1-2.pptx
Lec-1-2.pptx
namraashraf56
 
Netbeans65 Osum Slides
Netbeans65 Osum SlidesNetbeans65 Osum Slides
Netbeans65 Osum Slides
Abhishek Gupta
 
Front End Development | Introduction
Front End Development | IntroductionFront End Development | Introduction
Front End Development | Introduction
JohnTaieb
 
Web development concepts using microsoft technologies
Web development concepts using microsoft technologiesWeb development concepts using microsoft technologies
Web development concepts using microsoft technologies
Hosam Kamel
 
Full Stack development made on React JS Project
Full Stack development made on React JS ProjectFull Stack development made on React JS Project
Full Stack development made on React JS Project
AmanKoli6
 
INTRODUCTION.docx
INTRODUCTION.docxINTRODUCTION.docx
INTRODUCTION.docx
KaiSane1
 
Net training in bhubaneswar
Net training in bhubaneswar Net training in bhubaneswar
Net training in bhubaneswar
litbbsr
 
Front-End Web Development
Front-End Web DevelopmentFront-End Web Development
Front-End Web Development
Yash Sati
 
LATEST_TRENDS_IN_WEBSITE_DEVELOPMENT.pptx
LATEST_TRENDS_IN_WEBSITE_DEVELOPMENT.pptxLATEST_TRENDS_IN_WEBSITE_DEVELOPMENT.pptx
LATEST_TRENDS_IN_WEBSITE_DEVELOPMENT.pptx
chitrachauhan21
 
A Web development ppt seminar report.pptx
A Web development ppt seminar report.pptxA Web development ppt seminar report.pptx
A Web development ppt seminar report.pptx
SumitSen65
 
Ajax Abuse Todcon2008
Ajax Abuse Todcon2008Ajax Abuse Todcon2008
Ajax Abuse Todcon2008
Jesse Rodgers
 
LAMP is so yesterday, MEAN is so tomorrow! :)
LAMP is so yesterday, MEAN is so tomorrow! :) LAMP is so yesterday, MEAN is so tomorrow! :)
LAMP is so yesterday, MEAN is so tomorrow! :)
Sascha Sambale
 
Directions on microsoft_web_and_cloud_development
Directions on microsoft_web_and_cloud_developmentDirections on microsoft_web_and_cloud_development
Directions on microsoft_web_and_cloud_development
Takeshi Shinmura
 
front end presentation ppt for front end development with sample project
front end presentation ppt for front end development with sample projectfront end presentation ppt for front end development with sample project
front end presentation ppt for front end development with sample project
401ChaitanyaBajjuri
 
Dot Net Full Stack course in Hyderabad in tealanga
Dot Net Full Stack course in Hyderabad in tealangaDot Net Full Stack course in Hyderabad in tealanga
Dot Net Full Stack course in Hyderabad in tealanga
harithastoitechs
 
Buzzword, How'd They Build That?
Buzzword, How'd They Build That?Buzzword, How'd They Build That?
Buzzword, How'd They Build That?
dcoletta
 
Web Browser Accessibility using Open-Source Software
Web Browser Accessibility using Open-Source SoftwareWeb Browser Accessibility using Open-Source Software
Web Browser Accessibility using Open-Source Software
zeljkoobrenovic
 
Single page apps a bleeding edge new concept or a revived old one?
Single page apps   a bleeding edge new concept or a revived old one?Single page apps   a bleeding edge new concept or a revived old one?
Single page apps a bleeding edge new concept or a revived old one?
Omer Dawelbeit
 
Netbeans65 Osum Slides
Netbeans65 Osum SlidesNetbeans65 Osum Slides
Netbeans65 Osum Slides
Abhishek Gupta
 
Ad

More from university of education,Lahore (20)

Activites and Time Planning
 Activites and Time Planning Activites and Time Planning
Activites and Time Planning
university of education,Lahore
 
Steganography
SteganographySteganography
Steganography
university of education,Lahore
 
Classical Encryption Techniques
Classical Encryption TechniquesClassical Encryption Techniques
Classical Encryption Techniques
university of education,Lahore
 
Activites and Time Planning
Activites and Time PlanningActivites and Time Planning
Activites and Time Planning
university of education,Lahore
 
OSI Security Architecture
OSI Security ArchitectureOSI Security Architecture
OSI Security Architecture
university of education,Lahore
 
Network Security Terminologies
Network Security TerminologiesNetwork Security Terminologies
Network Security Terminologies
university of education,Lahore
 
Project Scheduling, Planning and Risk Management
Project Scheduling, Planning and Risk ManagementProject Scheduling, Planning and Risk Management
Project Scheduling, Planning and Risk Management
university of education,Lahore
 
Software Testing and Debugging
Software Testing and DebuggingSoftware Testing and Debugging
Software Testing and Debugging
university of education,Lahore
 
ePayment Methods
ePayment MethodsePayment Methods
ePayment Methods
university of education,Lahore
 
SEO
SEOSEO
SEO
university of education,Lahore
 
A Star Search
A Star SearchA Star Search
A Star Search
university of education,Lahore
 
Enterprise Application Integration
Enterprise Application IntegrationEnterprise Application Integration
Enterprise Application Integration
university of education,Lahore
 
Uml Diagrams
Uml DiagramsUml Diagrams
Uml Diagrams
university of education,Lahore
 
eDras Max
eDras MaxeDras Max
eDras Max
university of education,Lahore
 
RAD Model
RAD ModelRAD Model
RAD Model
university of education,Lahore
 
Microsoft Project
Microsoft ProjectMicrosoft Project
Microsoft Project
university of education,Lahore
 
Itertaive Process Development
Itertaive Process DevelopmentItertaive Process Development
Itertaive Process Development
university of education,Lahore
 
Computer Aided Software Engineering Nayab Awan
Computer Aided Software Engineering Nayab AwanComputer Aided Software Engineering Nayab Awan
Computer Aided Software Engineering Nayab Awan
university of education,Lahore
 
Lect 2 assessing the technology landscape
Lect 2 assessing the technology landscapeLect 2 assessing the technology landscape
Lect 2 assessing the technology landscape
university of education,Lahore
 
system level requirements gathering and analysis
system level requirements gathering and analysissystem level requirements gathering and analysis
system level requirements gathering and analysis
university of education,Lahore
 
Ad

Recently uploaded (20)

la storia dell'Inghilterra, letteratura inglese
la storia dell'Inghilterra, letteratura inglesela storia dell'Inghilterra, letteratura inglese
la storia dell'Inghilterra, letteratura inglese
LetiziaLucente
 
AR3201 WORLD ARCHITECTURE AND URBANISM EARLY CIVILISATIONS TO RENAISSANCE QUE...
AR3201 WORLD ARCHITECTURE AND URBANISM EARLY CIVILISATIONS TO RENAISSANCE QUE...AR3201 WORLD ARCHITECTURE AND URBANISM EARLY CIVILISATIONS TO RENAISSANCE QUE...
AR3201 WORLD ARCHITECTURE AND URBANISM EARLY CIVILISATIONS TO RENAISSANCE QUE...
Mani Sasidharan
 
Smart Borrowing: Everything You Need to Know About Short Term Loans in India
Smart Borrowing: Everything You Need to Know About Short Term Loans in IndiaSmart Borrowing: Everything You Need to Know About Short Term Loans in India
Smart Borrowing: Everything You Need to Know About Short Term Loans in India
fincrifcontent
 
Webcrawler_Mule_AIChain_MuleSoft_Meetup_Hyderabad
Webcrawler_Mule_AIChain_MuleSoft_Meetup_HyderabadWebcrawler_Mule_AIChain_MuleSoft_Meetup_Hyderabad
Webcrawler_Mule_AIChain_MuleSoft_Meetup_Hyderabad
Veera Pallapu
 
Pharmaceutical_Incompatibilities.pptx
Pharmaceutical_Incompatibilities.pptxPharmaceutical_Incompatibilities.pptx
Pharmaceutical_Incompatibilities.pptx
Shantanu Ranjan
 
Forestry Model Exit Exam_2025_Wollega University, Gimbi Campus.pdf
Forestry Model Exit Exam_2025_Wollega University, Gimbi Campus.pdfForestry Model Exit Exam_2025_Wollega University, Gimbi Campus.pdf
Forestry Model Exit Exam_2025_Wollega University, Gimbi Campus.pdf
ChalaKelbessa
 
How to Create Time Off Request in Odoo 18 Time Off
How to Create Time Off Request in Odoo 18 Time OffHow to Create Time Off Request in Odoo 18 Time Off
How to Create Time Off Request in Odoo 18 Time Off
Celine George
 
WRITTEN THEME ROUND- OPEN GENERAL QUIZ.pptx
WRITTEN THEME ROUND- OPEN GENERAL QUIZ.pptxWRITTEN THEME ROUND- OPEN GENERAL QUIZ.pptx
WRITTEN THEME ROUND- OPEN GENERAL QUIZ.pptx
Sourav Kr Podder
 
Swachata Quiz - Prelims - 01.10.24 - Quiz Club IIT Patna
Swachata Quiz - Prelims - 01.10.24 - Quiz Club IIT PatnaSwachata Quiz - Prelims - 01.10.24 - Quiz Club IIT Patna
Swachata Quiz - Prelims - 01.10.24 - Quiz Club IIT Patna
Quiz Club, Indian Institute of Technology, Patna
 
Analysis of Quantitative Data Parametric and non-parametric tests.pptx
Analysis of Quantitative Data Parametric and non-parametric tests.pptxAnalysis of Quantitative Data Parametric and non-parametric tests.pptx
Analysis of Quantitative Data Parametric and non-parametric tests.pptx
Shrutidhara2
 
Fatman Book HD Pdf by aayush songare.pdf
Fatman Book  HD Pdf by aayush songare.pdfFatman Book  HD Pdf by aayush songare.pdf
Fatman Book HD Pdf by aayush songare.pdf
Aayush Songare
 
"Hymenoptera: A Diverse and Fascinating Order".pptx
"Hymenoptera: A Diverse and Fascinating Order".pptx"Hymenoptera: A Diverse and Fascinating Order".pptx
"Hymenoptera: A Diverse and Fascinating Order".pptx
Arshad Shaikh
 
State institute of educational technology
State institute of educational technologyState institute of educational technology
State institute of educational technology
vp5806484
 
Search Engine Optimization (SEO) for Website Success
Search Engine Optimization (SEO) for Website SuccessSearch Engine Optimization (SEO) for Website Success
Search Engine Optimization (SEO) for Website Success
Muneeb Rana
 
LDMMIA Bonus GUEST GRAD Student Check-in
LDMMIA Bonus GUEST GRAD Student Check-inLDMMIA Bonus GUEST GRAD Student Check-in
LDMMIA Bonus GUEST GRAD Student Check-in
LDM & Mia eStudios
 
Trends Spotting Strategic foresight for tomorrow’s education systems - Debora...
Trends Spotting Strategic foresight for tomorrow’s education systems - Debora...Trends Spotting Strategic foresight for tomorrow’s education systems - Debora...
Trends Spotting Strategic foresight for tomorrow’s education systems - Debora...
EduSkills OECD
 
CBSE - Grade 11 - Mathematics - Ch 2 - Relations And Functions - Notes (PDF F...
CBSE - Grade 11 - Mathematics - Ch 2 - Relations And Functions - Notes (PDF F...CBSE - Grade 11 - Mathematics - Ch 2 - Relations And Functions - Notes (PDF F...
CBSE - Grade 11 - Mathematics - Ch 2 - Relations And Functions - Notes (PDF F...
Sritoma Majumder
 
Semisolid_Dosage_Forms.pptx
Semisolid_Dosage_Forms.pptxSemisolid_Dosage_Forms.pptx
Semisolid_Dosage_Forms.pptx
Shantanu Ranjan
 
Pests of Rice: Damage, Identification, Life history, and Management.pptx
Pests of Rice: Damage, Identification, Life history, and Management.pptxPests of Rice: Damage, Identification, Life history, and Management.pptx
Pests of Rice: Damage, Identification, Life history, and Management.pptx
Arshad Shaikh
 
Cloud Computing ..PPT ( Faizan ALTAF )..
Cloud Computing ..PPT ( Faizan ALTAF )..Cloud Computing ..PPT ( Faizan ALTAF )..
Cloud Computing ..PPT ( Faizan ALTAF )..
faizanaltaf231
 
la storia dell'Inghilterra, letteratura inglese
la storia dell'Inghilterra, letteratura inglesela storia dell'Inghilterra, letteratura inglese
la storia dell'Inghilterra, letteratura inglese
LetiziaLucente
 
AR3201 WORLD ARCHITECTURE AND URBANISM EARLY CIVILISATIONS TO RENAISSANCE QUE...
AR3201 WORLD ARCHITECTURE AND URBANISM EARLY CIVILISATIONS TO RENAISSANCE QUE...AR3201 WORLD ARCHITECTURE AND URBANISM EARLY CIVILISATIONS TO RENAISSANCE QUE...
AR3201 WORLD ARCHITECTURE AND URBANISM EARLY CIVILISATIONS TO RENAISSANCE QUE...
Mani Sasidharan
 
Smart Borrowing: Everything You Need to Know About Short Term Loans in India
Smart Borrowing: Everything You Need to Know About Short Term Loans in IndiaSmart Borrowing: Everything You Need to Know About Short Term Loans in India
Smart Borrowing: Everything You Need to Know About Short Term Loans in India
fincrifcontent
 
Webcrawler_Mule_AIChain_MuleSoft_Meetup_Hyderabad
Webcrawler_Mule_AIChain_MuleSoft_Meetup_HyderabadWebcrawler_Mule_AIChain_MuleSoft_Meetup_Hyderabad
Webcrawler_Mule_AIChain_MuleSoft_Meetup_Hyderabad
Veera Pallapu
 
Pharmaceutical_Incompatibilities.pptx
Pharmaceutical_Incompatibilities.pptxPharmaceutical_Incompatibilities.pptx
Pharmaceutical_Incompatibilities.pptx
Shantanu Ranjan
 
Forestry Model Exit Exam_2025_Wollega University, Gimbi Campus.pdf
Forestry Model Exit Exam_2025_Wollega University, Gimbi Campus.pdfForestry Model Exit Exam_2025_Wollega University, Gimbi Campus.pdf
Forestry Model Exit Exam_2025_Wollega University, Gimbi Campus.pdf
ChalaKelbessa
 
How to Create Time Off Request in Odoo 18 Time Off
How to Create Time Off Request in Odoo 18 Time OffHow to Create Time Off Request in Odoo 18 Time Off
How to Create Time Off Request in Odoo 18 Time Off
Celine George
 
WRITTEN THEME ROUND- OPEN GENERAL QUIZ.pptx
WRITTEN THEME ROUND- OPEN GENERAL QUIZ.pptxWRITTEN THEME ROUND- OPEN GENERAL QUIZ.pptx
WRITTEN THEME ROUND- OPEN GENERAL QUIZ.pptx
Sourav Kr Podder
 
Analysis of Quantitative Data Parametric and non-parametric tests.pptx
Analysis of Quantitative Data Parametric and non-parametric tests.pptxAnalysis of Quantitative Data Parametric and non-parametric tests.pptx
Analysis of Quantitative Data Parametric and non-parametric tests.pptx
Shrutidhara2
 
Fatman Book HD Pdf by aayush songare.pdf
Fatman Book  HD Pdf by aayush songare.pdfFatman Book  HD Pdf by aayush songare.pdf
Fatman Book HD Pdf by aayush songare.pdf
Aayush Songare
 
"Hymenoptera: A Diverse and Fascinating Order".pptx
"Hymenoptera: A Diverse and Fascinating Order".pptx"Hymenoptera: A Diverse and Fascinating Order".pptx
"Hymenoptera: A Diverse and Fascinating Order".pptx
Arshad Shaikh
 
State institute of educational technology
State institute of educational technologyState institute of educational technology
State institute of educational technology
vp5806484
 
Search Engine Optimization (SEO) for Website Success
Search Engine Optimization (SEO) for Website SuccessSearch Engine Optimization (SEO) for Website Success
Search Engine Optimization (SEO) for Website Success
Muneeb Rana
 
LDMMIA Bonus GUEST GRAD Student Check-in
LDMMIA Bonus GUEST GRAD Student Check-inLDMMIA Bonus GUEST GRAD Student Check-in
LDMMIA Bonus GUEST GRAD Student Check-in
LDM & Mia eStudios
 
Trends Spotting Strategic foresight for tomorrow’s education systems - Debora...
Trends Spotting Strategic foresight for tomorrow’s education systems - Debora...Trends Spotting Strategic foresight for tomorrow’s education systems - Debora...
Trends Spotting Strategic foresight for tomorrow’s education systems - Debora...
EduSkills OECD
 
CBSE - Grade 11 - Mathematics - Ch 2 - Relations And Functions - Notes (PDF F...
CBSE - Grade 11 - Mathematics - Ch 2 - Relations And Functions - Notes (PDF F...CBSE - Grade 11 - Mathematics - Ch 2 - Relations And Functions - Notes (PDF F...
CBSE - Grade 11 - Mathematics - Ch 2 - Relations And Functions - Notes (PDF F...
Sritoma Majumder
 
Semisolid_Dosage_Forms.pptx
Semisolid_Dosage_Forms.pptxSemisolid_Dosage_Forms.pptx
Semisolid_Dosage_Forms.pptx
Shantanu Ranjan
 
Pests of Rice: Damage, Identification, Life history, and Management.pptx
Pests of Rice: Damage, Identification, Life history, and Management.pptxPests of Rice: Damage, Identification, Life history, and Management.pptx
Pests of Rice: Damage, Identification, Life history, and Management.pptx
Arshad Shaikh
 
Cloud Computing ..PPT ( Faizan ALTAF )..
Cloud Computing ..PPT ( Faizan ALTAF )..Cloud Computing ..PPT ( Faizan ALTAF )..
Cloud Computing ..PPT ( Faizan ALTAF )..
faizanaltaf231
 

Java Script Introduction

  • 1. BS (Hons.) Information Technology Semester-V Web Engineering Javascript Submitted By: Mufeed Abbas (1026) Submitted To: Mr. Inam ul Haq UNIVERSITY OF EDUCATION, LAHORE OKARA-CAMPUS Dated: October 22, 2015
  • 2. Introduction  What is it?  How does it work?  What is Java?  Learning JavaScript  JavaScript Statements  JavaScript and HTML forms
  • 3. What is JavaScript?  Browsers have limited functionality  Text, images, tables, frames  JavaScript allows for interactivity  Browser/page manipulation  Reacting to user actions  A type of programming language  Easy to learn  Developed by Netscape  Now a standard exists – www.ecma- international.org/publications/ standards/ECMA-262.HTM
  • 4. JavaScript Allows Interactivity  Improve appearance  Especially graphics  Visual feedback  Site navigation  Perform calculations  Validation of input  Other technologies
  • 5. How Does It Work?  Embedded within HTML page  View source  Executes on client  Fast, no connection needed once loaded  Simple programming statements combined with HTML tags  Interpreted (not compiled)  No special tools required
  • 6. What is Java?  Totally different  A full programming language  Much harder!  A compiled language  Independent of the web  Sometimes used together
  • 7. Learning JavaScript  Special syntax to learn  Learn the basics and then use other people's (lots of free sites)  Write it in a text editor, view results in browser  You need to revise your HTML  You need patience and good eyesight!
  • 8. JavaScript Statements <html> <head><title>My Page</title></head> <body> <script language="JavaScript"> document.write('This is my first → JavaScript Page'); </script> </body> </html>
  • 9. JavaScript Statements <html> <head><title>My Page</title></head> <body> <script language=“JavaScript"> document.write('<h1>This is my first → JavaScript Page</h1>'); </script> </body> </html>
  • 10. JavaScript Statements <html> <head><title>My Page</title></head> <body> <p> <a href="myfile.html">My Page</a> <br /> <a href="myfile.html" onMouseover="window.alert('Hello');"> My Page</A> </p> </body> </html>
  • 11. Example Statements <script language="JavaScript"> window.prompt('Enter your name:',''); </script> <form> <input type="button" Value="Press" onClick="window.alert('Hello');"> </form>
  • 12. HTML Forms and JavaScript  JavaScript is very good at processing user input in the web browser  HTML <form> elements receive input  Forms and form elements have unique names  Each unique element can be identified  Uses JavaScript Document Object Model (DOM)

Editor's Notes

  • #2: This talk introduces the JavaScript language. © Netskills, University of Newcastle Copyright in the whole and every part of this Courseware whether in the form of a written manual,document, software program, service or otherwise belongs to the University of Newcastle upon Tyne (&amp;quot;the Owner&amp;quot;) and may not be used, sold, licensed, transferred, copied or reproduced in whole or in part in any manner or form or in or on any media to any person other than in accordance with the terms of the Owner&amp;apos;s Licence Agreement or otherwise without the prior written consent of the Owner. All use of this material is governed by the Owner&amp;apos;s Standard Licence Agreement together with the appropriate Schedule. The following are available: A Standard Licence Schedule to cover all use including all for-profit use by any type of organisation and all use by non-educational establishments An Educational Licence Schedule for not-for-profit internal use only by a recognised educational establishment The Netskills logo and this copyright notice must be included in any copy or adaptation. Netskills is a trademark of Netskills, University of Newcastle
  • #3: This talk aims to give an overview of JavaScript - introducing the concepts and explaining the potential and possible uses. The talk moves on to describe the basics behind the language, how and where it operates and how it is included in a web page. A number of real examples of JavaScript are provided to demonstrate some of the features and syntax of the language, and to identify key concepts. As part of this, a quick refresher on the HTML form tags is given as this is crucial to many of the exercises in the accompanying hands-on document. A comparison with Java is given to clear up any confusion surrounding the connection between the two languages.
  • #4: When the web was conceived, browsers were limited to text and image - later tables and frames. The extent to which they provided interactivity with the user was very limited. JavaScript was developed by Netscape as a simple programming language (often referred to as a scripting language). It is easy to learn and small sections of JavaScript can be added to a web page rather than needing to develop complicated programs. It was specially designed for web page interaction and manipulating the web browser and page elements. It is often used to respond to user actions such as mouse clicks. Although developed by Netscape, and other variants exist, such as Jscript from Microsoft, a standard has been developed by the European Computer Manufacturers Association. It is known as ECMAScript, using the standard ECMA262, which can be found fully documented at the address on the slide.
  • #5: Examples should be shown which demonstrate different uses of JavaScript. For example, try the calculator example at the address shown. JavaScript can provide interactivity and/or enhance pages in several ways. It is particularly good at manipulating browser elements and images to improve page presentation and navigation. As a programming language it can handle quite complex calculations and control the behaviour of embedded content including images. A useful function is input validation - checking form responses BEFORE the form is sent for processing to a server. In this way it can be quicker and more user friendly, providing immediate feedback to the user. JavaScript can be combined with other technologies such as Java applets or plug-ins, but this is beyond the scope of this presentation.
  • #6: JavaScript is embedded/included within HTML. You can often see JavaScript in the source of a web page or it is provided for information on the page as with the calculator example. JavaScript is mainly used as a client-side language - it downloads with the web page. Once the page has downloaded and is on the users&amp;apos; machine, it is actually the web browser which then interprets the JavaScript instructions. JavaScript pages run quickly, you are not relying on an internet connection to a web server. Short pieces of JavaScript can be combined with HTML without the need to develop a fully blown program. There are two types of computer language, compiled and interpreted. To write or edit a compiled language requires a special piece of software called a compiler. JavaScript belongs to the other category, called interpreted. In the case of JavaScript, this interpretation is done by the browser software at run-time. Because JavaScript is interpreted, this means that no special tools are required to write or edit JavaScript, just a normal text editor. JavaScript web pages can be platform independent i.e. they will run on different browsers and computers (as long as the browser is JavaScript enabled). If you see a JavaScript web page that you like, you may be able to take that JavaScript and use it for your own purposes. (Remember to acknowledge the original author!)
  • #7: Java is often confused with JavaScript. JavaScript was originally called LiveScript, but due to the popularity of Java at the time, it was renamed JavaScript . Java is different from JavaScript in a number of significant areas: Java is a full programming language which can do just about anything - JavaScript isn&amp;apos;t and can only do relatively simple things. Java is much harder to learn and takes much longer to master. Java is compiled. The language is not &amp;apos;embedded&amp;apos; or written in the page - it is self-contained as a separate file. Java can be used/written totally independently from the web - JavaScript works with web browsers only. They are sometimes used together - JavaScript can be used to &amp;apos;control&amp;apos; or configure Java &amp;apos;applets&amp;apos;. This talk does not cover Java in any more detail. A separate Netskills Training Module investigates the use of Java applets.
  • #8: To learn JavaScript you will need to learn some of its language syntax. However, a good strategy is to learn the basics, and then use and adapt other people&amp;apos;s JavaScript. There are plenty of sites on the internet offering free JavaScript (see slide 4) with the calculator example. Other useful addresses are provided in the notes of last slide. As with HTML, JavaScript can be written in a text editor and viewed in a browser. As it is a programming language the syntax is quite strict (compared to HTML). It is also a good idea to make sure your HTML is up to scratch as this will save you time. The hands-on exercises contain an refresher exercise on HTML forms.
  • #9: JavaScript can be contained either in the header section of an HTML page or in the body. This JavaScript statement is shown as a pure JavaScript statement within SCRIPT tags. Notice that there is no HTML in the body of this page at all. (Demonstrate what this JavaScript looks like in a web browser). This statement writes a line of text on a web page. The command document.write is a standard function in JavaScript to write text to the page. The following is a more technical explanation for background information only: document.write is derived from the JavaScript object model (not covered in detail here). It works on the principle that all document and browser elements have an object name (document, window, image etc) and can each has various properties that can be manipulated. The object hierarchy means that individual elements can be uniquely identified i.e. document.myform.mytext would refer to the text entry named mytext within the form called myform within the current page (document). The arrow symbol &amp;apos;&amp;apos; is used in these slides and in the workbook to indicate where a JavaScript statement should be typed on one line without a break. A line break in the wrong place will stop JavaScript from working.e.g. document.write(&amp;apos;This is my first  JavaScript Page&amp;apos;); should actually be typed: document.write(&amp;apos;This is my first JavaScript Page&amp;apos;);
  • #10: This example demonstrates that anything included within the quotes in the document.write statement is printed to the screen, and this includes HTML tags. The &amp;lt;h1&amp;gt; tag is delivered to the browser along with the text, and the browser would interpret it as a normal HTML file, displaying the text in the Heading 1 style. IMPORTANT NOTE: This example shows a JavaScript statement in the &amp;lt;body&amp;gt; of the web page. It is possible to include JavaScript statements in the &amp;lt;head&amp;gt; section of a web page but care must be taken that they do not try to access items that don&amp;apos;t exist until the page has loaded (e.g. form elements, links, images). The web browser parses (reads through and executes) any script commands as it displays the page. In most cases it is common sense that dictates where a statement should be placed. If, in the above example, document.write was placed in the &amp;lt;head&amp;gt; of the page, the text &amp;quot;This is my first JavaScript Page&amp;quot; would appear in the &amp;lt;head&amp;gt; of the finished page – this would be incorrect – although modern browsers will let you get away with it! In some circumstances you may wish to use document.write in the &amp;lt;head&amp;gt; - for example to dynamically generate &amp;lt;meta&amp;gt; or &amp;lt;title&amp;gt; tags. Such uses are not considered here. JavaScript functions are typically defined in the &amp;lt;head&amp;gt; section of a web page as they do not normally execute until they have been triggered elsewhere. The use of functions in JavaScript is covered in the Netskills Training Module: &amp;quot;Further JavaScript (Enhancing JavaScript with Functions and Events)&amp;quot;
  • #11: Compare this example with the previous one. This time the JavaScript is written inside the HTML tags and there are no &amp;lt;script&amp;gt; tags. In this case if the browser is JavaScript-enabled it will process the commands when it needs to. If the browser doesn&amp;apos;t understand JavaScript it will ignore the extra code (it should see it as an HTML attribute that it cannot process and therefore ignores, although very old browsers my throw an error) This example demonstrates an HTML hyperlink, but notice the JavaScript enclosed within the &amp;lt;a href.. tag of the second link. onMouseOver is referring to an event. That is, this JavaScript will happen in response to something that the user does e.g click a button, or in this case, when they move the mouse over the link (this will not happen if you move your mouse over the first link!). window.alert will display what is called an alert box on the screen containing the text specified, in this case, &amp;quot;hello&amp;quot;. The first link will behave normally. (See separate Netskills Training Module for more details on Functions and Events in JavaScript.)
  • #12: This example shows two separate statements. The first is some pure JavaScript so must be contained within &amp;lt;script&amp;gt; tags. It displays a pop up box with the message &amp;quot;Enter your name&amp;quot; and a space to type in text. This occurs immediately when the page loads. The second statement is within an HTML form. The &amp;lt;input&amp;gt; tag includes some JavaScript within it. The tag creates a form element (a button) and associates with it some JavaScript. The JavaScript responds to the mouse click event (onClick) on the button by producing a pop up alert box with the text &amp;apos;Hello&amp;apos; in. This only occurs when the user triggers the event by clicking on the button. JavaScript makes use of both single and double quotes. They are used in this example to have a text string &amp;apos;Hello&amp;apos; contained within another string which defines the code to be carried out in response to the onClick event. It is important that the quotes should match - if they don&amp;apos;t, your JavaScript will not work!
  • #13: JavaScript is very useful for processing and manipulating user input and form elements. A common way of obtaining input is via the HTML &amp;lt;form&amp;gt; elements which can provide text entry boxes, selection boxes, menus and buttons. Form elements can be named and hence uniquely identified within the JavaScript object model.