SlideShare una empresa de Scribd logo
1 de 3
Descargar para leer sin conexión
What is JavaScript?
JavaScript is a scripting or programming language that allows you to
implement complex features on web pages — every time a web page does
more than just sit there and display static information for you to look at —
displaying timely content updates, interactive maps, animated 2D/3D graphics,
scrolling video jukeboxes, etc. — you can bet that JavaScript is probably
involved. It is the third layer of the layer cake of standard web technologies,
two of which (HTML and CSS) we have covered in much more detail in other
parts of the Learning Area.
 HTML is the markup language that we use to structure and give
meaning to our web content, for example defining paragraphs,
headings, and data tables, or embedding images and videos in the
page.
 CSS is a language of style rules that we use to apply styling to our
HTML content, for example setting background colors and fonts, and
laying out our content in multiple columns.
 JavaScript is a scripting language that enables you to create
dynamically updating content, control multimedia, animate images, and
pretty much everything else. (Okay, not everything, but it is amazing
what you can achieve with a few lines of JavaScript code.)
So what can it really do?
The core client-side JavaScript language consists of some common
programming features that allow you to do things like:
 Store useful values inside variables. In the above example for instance,
we ask for a new name to be entered then store that name in a variable
called name.
 Operations on pieces of text (known as "strings" in programming). In
the above example we take the string "Player 1: " and join it to
the name variable to create the complete text label, e.g. "Player 1:
Chris".
 Running code in response to certain events occurring on a web page.
We used a click event in our example above to detect when the label is
clicked and then run the code that updates the text label. And much more!
What is even more exciting however is the functionality built on top of the
client-side JavaScript language. So-called n ProgrammApplicatioing
Interfaces (APIs) provide you with extra superpowers to use in your JavaScript
code.
APIs are ready-made sets of code building blocks that allow a developer to
implement programs that would otherwise be hard or impossible to
implement. They do the same thing for programming that ready-made
furniture kits do for home building — it is much easier to take ready-cut
panels and screw them together to make a bookshelf than it is to work out the
design yourself, go and find the correct wood, cut all the panels to the right
size and shape, find the correct-sized screws, and then put them together to
make a bookshelf.
They generally fall into two categories.
Browser APIs are built into your web browser, and are able to expose data
from the surrounding computer environment, or do useful complex things. For
example: The DOM (Document Object Model) API allows you to manipulate
HTML and CSS, creating, removing and changing HTML, dynamically
applying new styles to your page, etc. Every time you see a popup
window appear on a page, or some new content displayed (as we saw
above in our simple demo) for example, that's the DOM in action.
 The Geolocation API retrieves geographical information. This is
how Google Maps is able to find your location and plot it on a map.
 The Canvas and WebGL APIs allow you to create animated 2D and 3D
graphics. People are doing some amazing things using these web
technologies — see Chrome Experiments and webglsamples.
 Audio and Video APIs like HTMLMediaElement and WebRTC allow
you to do really interesting things with multimedia, such as play audio
and video right in a web page, or grab video from your web camera
and display it on someone else's computer (try our simple Snapshot
demo to get the idea).
Third party APIs are not built into the browser by default, and you generally
have to grab their code and information from somewhere on the Web. For
example:
 The Twitter API allows you to do things like displaying your latest
tweets on your website.
 The Google Maps API and OpenStreetMap API allows you to embed
custom maps into your website, and other such functionality.
What is JavaScript doing on your page?
Here we'll actually start looking at some code, and while doing so, explore
what actually happens when you run some JavaScript in your page.
Let's briefly recap the story of what happens when you load a web page in a
browser (first talked about in our How CSS works article). When you load a
web page in your browser, you are running your code (the HTML, CSS, and
JavaScript) inside an execution environment (the browser tab). This is like a
factory that takes in raw materials (the code) and outputs a product (the web
page).A very common use of JavaScript is to dynamically modify HTML and
CSS to update a user interface, via the Document Object Model API (as
mentioned
above). Note that the code in your web documents is generally loaded and
executed in the order it appears on the page. Errors may occur if JavaScript is
loaded and run before the HTML and CSS that it is intended to modify. You
will learn ways around this later in the article, in the Script loading
strategies section.

Más contenido relacionado

Similar a JAVA SCRIPT.pdf

Front End Lecture 1.pptx
Front End Lecture 1.pptxFront End Lecture 1.pptx
Front End Lecture 1.pptxmalise2997
 
Ultimate Skills Checklist for Your First Front-End Developer Job
Ultimate Skills Checklist for Your First Front-End Developer JobUltimate Skills Checklist for Your First Front-End Developer Job
Ultimate Skills Checklist for Your First Front-End Developer JobBrenna Van Norman
 
Introjs10.5.17SD
Introjs10.5.17SDIntrojs10.5.17SD
Introjs10.5.17SDThinkful
 
HTML5 introduction for beginners
HTML5 introduction for beginnersHTML5 introduction for beginners
HTML5 introduction for beginnersVineeth N Krishnan
 
Making Of PHP Based Web Application
Making Of PHP Based Web ApplicationMaking Of PHP Based Web Application
Making Of PHP Based Web ApplicationSachin Walvekar
 
Microservices in Golang
Microservices in GolangMicroservices in Golang
Microservices in GolangMo'ath Qasim
 
introduction to html
introduction to htmlintroduction to html
introduction to htmlcodetech2
 
Introduction to Shiny for building web apps in R
Introduction to Shiny for building web apps in RIntroduction to Shiny for building web apps in R
Introduction to Shiny for building web apps in RPaul Richards
 
HTML & JAVA Script
HTML & JAVA ScriptHTML & JAVA Script
HTML & JAVA ScriptNitesh Gupta
 
JavaScript - Getting Started.pptx
JavaScript - Getting Started.pptxJavaScript - Getting Started.pptx
JavaScript - Getting Started.pptxJonnJorellPunto
 
Front End Development | Introduction
Front End Development | IntroductionFront End Development | Introduction
Front End Development | IntroductionJohnTaieb
 
Aspnet2.0 Introduction
Aspnet2.0 IntroductionAspnet2.0 Introduction
Aspnet2.0 IntroductionChanHan Hy
 

Similar a JAVA SCRIPT.pdf (20)

Front End Lecture 1.pptx
Front End Lecture 1.pptxFront End Lecture 1.pptx
Front End Lecture 1.pptx
 
Ultimate Skills Checklist for Your First Front-End Developer Job
Ultimate Skills Checklist for Your First Front-End Developer JobUltimate Skills Checklist for Your First Front-End Developer Job
Ultimate Skills Checklist for Your First Front-End Developer Job
 
It ppt.pptx
It ppt.pptxIt ppt.pptx
It ppt.pptx
 
Introjs10.5.17SD
Introjs10.5.17SDIntrojs10.5.17SD
Introjs10.5.17SD
 
HTML5 introduction for beginners
HTML5 introduction for beginnersHTML5 introduction for beginners
HTML5 introduction for beginners
 
Html5
Html5Html5
Html5
 
Introduction to JavaScript
Introduction to JavaScriptIntroduction to JavaScript
Introduction to JavaScript
 
Web 2.0
Web 2.0Web 2.0
Web 2.0
 
Making Of PHP Based Web Application
Making Of PHP Based Web ApplicationMaking Of PHP Based Web Application
Making Of PHP Based Web Application
 
Microservices in Golang
Microservices in GolangMicroservices in Golang
Microservices in Golang
 
introduction to html
introduction to htmlintroduction to html
introduction to html
 
Introduction to Shiny for building web apps in R
Introduction to Shiny for building web apps in RIntroduction to Shiny for building web apps in R
Introduction to Shiny for building web apps in R
 
HTML & JAVA Script
HTML & JAVA ScriptHTML & JAVA Script
HTML & JAVA Script
 
JavaScript - Getting Started.pptx
JavaScript - Getting Started.pptxJavaScript - Getting Started.pptx
JavaScript - Getting Started.pptx
 
Front End Development | Introduction
Front End Development | IntroductionFront End Development | Introduction
Front End Development | Introduction
 
INTRODUCTIONS OF HTML
INTRODUCTIONS OF HTMLINTRODUCTIONS OF HTML
INTRODUCTIONS OF HTML
 
Web 2 0 Tools
Web 2 0 ToolsWeb 2 0 Tools
Web 2 0 Tools
 
emerging
emergingemerging
emerging
 
emerging
emergingemerging
emerging
 
Aspnet2.0 Introduction
Aspnet2.0 IntroductionAspnet2.0 Introduction
Aspnet2.0 Introduction
 

Más de Satishkumar722293

Más de Satishkumar722293 (20)

What is artificial intelligence.pdf
What is artificial intelligence.pdfWhat is artificial intelligence.pdf
What is artificial intelligence.pdf
 
CAREER DEVELOPMENT.pdf
CAREER DEVELOPMENT.pdfCAREER DEVELOPMENT.pdf
CAREER DEVELOPMENT.pdf
 
What Is Business Plan.pdf
What Is Business Plan.pdfWhat Is Business Plan.pdf
What Is Business Plan.pdf
 
WHAT IS HTML.pdf
WHAT IS HTML.pdfWHAT IS HTML.pdf
WHAT IS HTML.pdf
 
What is artificial intelligence.pdf
What is artificial intelligence.pdfWhat is artificial intelligence.pdf
What is artificial intelligence.pdf
 
Contingent Staffing.pdf
Contingent Staffing.pdfContingent Staffing.pdf
Contingent Staffing.pdf
 
Digital Marketing.pdf
Digital Marketing.pdfDigital Marketing.pdf
Digital Marketing.pdf
 
Employment Relationship.pdf
Employment Relationship.pdfEmployment Relationship.pdf
Employment Relationship.pdf
 
programming testing.pdf
programming testing.pdfprogramming testing.pdf
programming testing.pdf
 
TRAINING & PLACEMENT CELL.pdf
TRAINING & PLACEMENT CELL.pdfTRAINING & PLACEMENT CELL.pdf
TRAINING & PLACEMENT CELL.pdf
 
Training & Development.pdf
Training & Development.pdfTraining & Development.pdf
Training & Development.pdf
 
What is artificial intelligence.pdf
What is artificial intelligence.pdfWhat is artificial intelligence.pdf
What is artificial intelligence.pdf
 
HUMAN RESOURCE MANAGEMENT.pdf
HUMAN RESOURCE MANAGEMENT.pdfHUMAN RESOURCE MANAGEMENT.pdf
HUMAN RESOURCE MANAGEMENT.pdf
 
CAREER DEVELOPMENT.pdf
CAREER DEVELOPMENT.pdfCAREER DEVELOPMENT.pdf
CAREER DEVELOPMENT.pdf
 
programming testing.pdf
programming testing.pdfprogramming testing.pdf
programming testing.pdf
 
DATA WAREHOUSE CONCEPT.pdf
DATA WAREHOUSE CONCEPT.pdfDATA WAREHOUSE CONCEPT.pdf
DATA WAREHOUSE CONCEPT.pdf
 
DATA WAREHOUSE CONCEPT.pdf
DATA WAREHOUSE CONCEPT.pdfDATA WAREHOUSE CONCEPT.pdf
DATA WAREHOUSE CONCEPT.pdf
 
MANAGEMENT SYSTEM.pdf
MANAGEMENT SYSTEM.pdfMANAGEMENT SYSTEM.pdf
MANAGEMENT SYSTEM.pdf
 
WHAT IS HTML.pdf
WHAT IS HTML.pdfWHAT IS HTML.pdf
WHAT IS HTML.pdf
 
MANAGEMENT SYSTEM.pdf
MANAGEMENT SYSTEM.pdfMANAGEMENT SYSTEM.pdf
MANAGEMENT SYSTEM.pdf
 

Último

OSU毕业证留学文凭,制做办理
OSU毕业证留学文凭,制做办理OSU毕业证留学文凭,制做办理
OSU毕业证留学文凭,制做办理cowagem
 
Delhi Call Girls Munirka 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Munirka 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls Munirka 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Munirka 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Callshivangimorya083
 
Production Day 1.pptxjvjbvbcbcb bj bvcbj
Production Day 1.pptxjvjbvbcbcb bj bvcbjProduction Day 1.pptxjvjbvbcbcb bj bvcbj
Production Day 1.pptxjvjbvbcbcb bj bvcbjLewisJB
 
Nandini Layout Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangal...
Nandini Layout Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangal...Nandini Layout Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangal...
Nandini Layout Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangal...amitlee9823
 
女王大学硕士毕业证成绩单(加急办理)认证海外毕业证
女王大学硕士毕业证成绩单(加急办理)认证海外毕业证女王大学硕士毕业证成绩单(加急办理)认证海外毕业证
女王大学硕士毕业证成绩单(加急办理)认证海外毕业证obuhobo
 
Delhi Call Girls Preet Vihar 9711199171 ☎✔👌✔ Whatsapp Body to body massage wi...
Delhi Call Girls Preet Vihar 9711199171 ☎✔👌✔ Whatsapp Body to body massage wi...Delhi Call Girls Preet Vihar 9711199171 ☎✔👌✔ Whatsapp Body to body massage wi...
Delhi Call Girls Preet Vihar 9711199171 ☎✔👌✔ Whatsapp Body to body massage wi...shivangimorya083
 
TEST BANK For Evidence-Based Practice for Nurses Appraisal and Application of...
TEST BANK For Evidence-Based Practice for Nurses Appraisal and Application of...TEST BANK For Evidence-Based Practice for Nurses Appraisal and Application of...
TEST BANK For Evidence-Based Practice for Nurses Appraisal and Application of...robinsonayot
 
Dark Dubai Call Girls O525547819 Skin Call Girls Dubai
Dark Dubai Call Girls O525547819 Skin Call Girls DubaiDark Dubai Call Girls O525547819 Skin Call Girls Dubai
Dark Dubai Call Girls O525547819 Skin Call Girls Dubaikojalkojal131
 
Résumé (2 pager - 12 ft standard syntax)
Résumé (2 pager -  12 ft standard syntax)Résumé (2 pager -  12 ft standard syntax)
Résumé (2 pager - 12 ft standard syntax)Soham Mondal
 
(Call Girls) in Lucknow Real photos of Female Escorts 👩🏼‍❤️‍💋‍👩🏻 8923113531 ➝...
(Call Girls) in Lucknow Real photos of Female Escorts 👩🏼‍❤️‍💋‍👩🏻 8923113531 ➝...(Call Girls) in Lucknow Real photos of Female Escorts 👩🏼‍❤️‍💋‍👩🏻 8923113531 ➝...
(Call Girls) in Lucknow Real photos of Female Escorts 👩🏼‍❤️‍💋‍👩🏻 8923113531 ➝...gurkirankumar98700
 
Book Paid Saswad Call Girls Pune 8250192130Low Budget Full Independent High P...
Book Paid Saswad Call Girls Pune 8250192130Low Budget Full Independent High P...Book Paid Saswad Call Girls Pune 8250192130Low Budget Full Independent High P...
Book Paid Saswad Call Girls Pune 8250192130Low Budget Full Independent High P...ranjana rawat
 
Motilal Oswal Gift City Fund PPT - Apr 2024.pptx
Motilal Oswal Gift City Fund PPT - Apr 2024.pptxMotilal Oswal Gift City Fund PPT - Apr 2024.pptx
Motilal Oswal Gift City Fund PPT - Apr 2024.pptxMaulikVasani1
 
VIP Call Girls Service Film Nagar Hyderabad Call +91-8250192130
VIP Call Girls Service Film Nagar Hyderabad Call +91-8250192130VIP Call Girls Service Film Nagar Hyderabad Call +91-8250192130
VIP Call Girls Service Film Nagar Hyderabad Call +91-8250192130Suhani Kapoor
 
CALL ON ➥8923113531 🔝Call Girls Husainganj Lucknow best Female service 🧳
CALL ON ➥8923113531 🔝Call Girls Husainganj Lucknow best Female service  🧳CALL ON ➥8923113531 🔝Call Girls Husainganj Lucknow best Female service  🧳
CALL ON ➥8923113531 🔝Call Girls Husainganj Lucknow best Female service 🧳anilsa9823
 
Vip Modals Call Girls (Delhi) Rohini 9711199171✔️ Full night Service for one...
Vip  Modals Call Girls (Delhi) Rohini 9711199171✔️ Full night Service for one...Vip  Modals Call Girls (Delhi) Rohini 9711199171✔️ Full night Service for one...
Vip Modals Call Girls (Delhi) Rohini 9711199171✔️ Full night Service for one...shivangimorya083
 
Call Girls Hosur Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Hosur Just Call 👗 7737669865 👗 Top Class Call Girl Service BangaloreCall Girls Hosur Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Hosur Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangaloreamitlee9823
 
Biography of Sundar Pichai, the CEO Google
Biography of Sundar Pichai, the CEO GoogleBiography of Sundar Pichai, the CEO Google
Biography of Sundar Pichai, the CEO GoogleHafizMuhammadAbdulla5
 
WhatsApp 📞 8448380779 ✅Call Girls In Salarpur Sector 81 ( Noida)
WhatsApp 📞 8448380779 ✅Call Girls In Salarpur Sector 81 ( Noida)WhatsApp 📞 8448380779 ✅Call Girls In Salarpur Sector 81 ( Noida)
WhatsApp 📞 8448380779 ✅Call Girls In Salarpur Sector 81 ( Noida)Delhi Call girls
 

Último (20)

OSU毕业证留学文凭,制做办理
OSU毕业证留学文凭,制做办理OSU毕业证留学文凭,制做办理
OSU毕业证留学文凭,制做办理
 
Delhi Call Girls Munirka 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Munirka 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls Munirka 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Munirka 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
 
Production Day 1.pptxjvjbvbcbcb bj bvcbj
Production Day 1.pptxjvjbvbcbcb bj bvcbjProduction Day 1.pptxjvjbvbcbcb bj bvcbj
Production Day 1.pptxjvjbvbcbcb bj bvcbj
 
Nandini Layout Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangal...
Nandini Layout Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangal...Nandini Layout Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangal...
Nandini Layout Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangal...
 
女王大学硕士毕业证成绩单(加急办理)认证海外毕业证
女王大学硕士毕业证成绩单(加急办理)认证海外毕业证女王大学硕士毕业证成绩单(加急办理)认证海外毕业证
女王大学硕士毕业证成绩单(加急办理)认证海外毕业证
 
Delhi Call Girls Preet Vihar 9711199171 ☎✔👌✔ Whatsapp Body to body massage wi...
Delhi Call Girls Preet Vihar 9711199171 ☎✔👌✔ Whatsapp Body to body massage wi...Delhi Call Girls Preet Vihar 9711199171 ☎✔👌✔ Whatsapp Body to body massage wi...
Delhi Call Girls Preet Vihar 9711199171 ☎✔👌✔ Whatsapp Body to body massage wi...
 
TEST BANK For Evidence-Based Practice for Nurses Appraisal and Application of...
TEST BANK For Evidence-Based Practice for Nurses Appraisal and Application of...TEST BANK For Evidence-Based Practice for Nurses Appraisal and Application of...
TEST BANK For Evidence-Based Practice for Nurses Appraisal and Application of...
 
Dark Dubai Call Girls O525547819 Skin Call Girls Dubai
Dark Dubai Call Girls O525547819 Skin Call Girls DubaiDark Dubai Call Girls O525547819 Skin Call Girls Dubai
Dark Dubai Call Girls O525547819 Skin Call Girls Dubai
 
Résumé (2 pager - 12 ft standard syntax)
Résumé (2 pager -  12 ft standard syntax)Résumé (2 pager -  12 ft standard syntax)
Résumé (2 pager - 12 ft standard syntax)
 
(Call Girls) in Lucknow Real photos of Female Escorts 👩🏼‍❤️‍💋‍👩🏻 8923113531 ➝...
(Call Girls) in Lucknow Real photos of Female Escorts 👩🏼‍❤️‍💋‍👩🏻 8923113531 ➝...(Call Girls) in Lucknow Real photos of Female Escorts 👩🏼‍❤️‍💋‍👩🏻 8923113531 ➝...
(Call Girls) in Lucknow Real photos of Female Escorts 👩🏼‍❤️‍💋‍👩🏻 8923113531 ➝...
 
Book Paid Saswad Call Girls Pune 8250192130Low Budget Full Independent High P...
Book Paid Saswad Call Girls Pune 8250192130Low Budget Full Independent High P...Book Paid Saswad Call Girls Pune 8250192130Low Budget Full Independent High P...
Book Paid Saswad Call Girls Pune 8250192130Low Budget Full Independent High P...
 
Motilal Oswal Gift City Fund PPT - Apr 2024.pptx
Motilal Oswal Gift City Fund PPT - Apr 2024.pptxMotilal Oswal Gift City Fund PPT - Apr 2024.pptx
Motilal Oswal Gift City Fund PPT - Apr 2024.pptx
 
VIP Call Girls Service Film Nagar Hyderabad Call +91-8250192130
VIP Call Girls Service Film Nagar Hyderabad Call +91-8250192130VIP Call Girls Service Film Nagar Hyderabad Call +91-8250192130
VIP Call Girls Service Film Nagar Hyderabad Call +91-8250192130
 
Sensual Moments: +91 9999965857 Independent Call Girls Paharganj Delhi {{ Mon...
Sensual Moments: +91 9999965857 Independent Call Girls Paharganj Delhi {{ Mon...Sensual Moments: +91 9999965857 Independent Call Girls Paharganj Delhi {{ Mon...
Sensual Moments: +91 9999965857 Independent Call Girls Paharganj Delhi {{ Mon...
 
CALL ON ➥8923113531 🔝Call Girls Husainganj Lucknow best Female service 🧳
CALL ON ➥8923113531 🔝Call Girls Husainganj Lucknow best Female service  🧳CALL ON ➥8923113531 🔝Call Girls Husainganj Lucknow best Female service  🧳
CALL ON ➥8923113531 🔝Call Girls Husainganj Lucknow best Female service 🧳
 
Vip Modals Call Girls (Delhi) Rohini 9711199171✔️ Full night Service for one...
Vip  Modals Call Girls (Delhi) Rohini 9711199171✔️ Full night Service for one...Vip  Modals Call Girls (Delhi) Rohini 9711199171✔️ Full night Service for one...
Vip Modals Call Girls (Delhi) Rohini 9711199171✔️ Full night Service for one...
 
Call Girls Hosur Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Hosur Just Call 👗 7737669865 👗 Top Class Call Girl Service BangaloreCall Girls Hosur Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Hosur Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
 
Biography of Sundar Pichai, the CEO Google
Biography of Sundar Pichai, the CEO GoogleBiography of Sundar Pichai, the CEO Google
Biography of Sundar Pichai, the CEO Google
 
VVVIP Call Girls In East Of Kailash ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...
VVVIP Call Girls In East Of Kailash ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...VVVIP Call Girls In East Of Kailash ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...
VVVIP Call Girls In East Of Kailash ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...
 
WhatsApp 📞 8448380779 ✅Call Girls In Salarpur Sector 81 ( Noida)
WhatsApp 📞 8448380779 ✅Call Girls In Salarpur Sector 81 ( Noida)WhatsApp 📞 8448380779 ✅Call Girls In Salarpur Sector 81 ( Noida)
WhatsApp 📞 8448380779 ✅Call Girls In Salarpur Sector 81 ( Noida)
 

JAVA SCRIPT.pdf

  • 1. What is JavaScript? JavaScript is a scripting or programming language that allows you to implement complex features on web pages — every time a web page does more than just sit there and display static information for you to look at — displaying timely content updates, interactive maps, animated 2D/3D graphics, scrolling video jukeboxes, etc. — you can bet that JavaScript is probably involved. It is the third layer of the layer cake of standard web technologies, two of which (HTML and CSS) we have covered in much more detail in other parts of the Learning Area.  HTML is the markup language that we use to structure and give meaning to our web content, for example defining paragraphs, headings, and data tables, or embedding images and videos in the page.  CSS is a language of style rules that we use to apply styling to our HTML content, for example setting background colors and fonts, and laying out our content in multiple columns.  JavaScript is a scripting language that enables you to create dynamically updating content, control multimedia, animate images, and pretty much everything else. (Okay, not everything, but it is amazing what you can achieve with a few lines of JavaScript code.) So what can it really do? The core client-side JavaScript language consists of some common programming features that allow you to do things like:  Store useful values inside variables. In the above example for instance, we ask for a new name to be entered then store that name in a variable called name.  Operations on pieces of text (known as "strings" in programming). In the above example we take the string "Player 1: " and join it to the name variable to create the complete text label, e.g. "Player 1: Chris".  Running code in response to certain events occurring on a web page. We used a click event in our example above to detect when the label is clicked and then run the code that updates the text label. And much more! What is even more exciting however is the functionality built on top of the
  • 2. client-side JavaScript language. So-called n ProgrammApplicatioing Interfaces (APIs) provide you with extra superpowers to use in your JavaScript code. APIs are ready-made sets of code building blocks that allow a developer to implement programs that would otherwise be hard or impossible to implement. They do the same thing for programming that ready-made furniture kits do for home building — it is much easier to take ready-cut panels and screw them together to make a bookshelf than it is to work out the design yourself, go and find the correct wood, cut all the panels to the right size and shape, find the correct-sized screws, and then put them together to make a bookshelf. They generally fall into two categories. Browser APIs are built into your web browser, and are able to expose data from the surrounding computer environment, or do useful complex things. For example: The DOM (Document Object Model) API allows you to manipulate HTML and CSS, creating, removing and changing HTML, dynamically applying new styles to your page, etc. Every time you see a popup window appear on a page, or some new content displayed (as we saw above in our simple demo) for example, that's the DOM in action.  The Geolocation API retrieves geographical information. This is how Google Maps is able to find your location and plot it on a map.  The Canvas and WebGL APIs allow you to create animated 2D and 3D graphics. People are doing some amazing things using these web technologies — see Chrome Experiments and webglsamples.  Audio and Video APIs like HTMLMediaElement and WebRTC allow you to do really interesting things with multimedia, such as play audio and video right in a web page, or grab video from your web camera and display it on someone else's computer (try our simple Snapshot demo to get the idea). Third party APIs are not built into the browser by default, and you generally have to grab their code and information from somewhere on the Web. For example:  The Twitter API allows you to do things like displaying your latest tweets on your website.
  • 3.  The Google Maps API and OpenStreetMap API allows you to embed custom maps into your website, and other such functionality. What is JavaScript doing on your page? Here we'll actually start looking at some code, and while doing so, explore what actually happens when you run some JavaScript in your page. Let's briefly recap the story of what happens when you load a web page in a browser (first talked about in our How CSS works article). When you load a web page in your browser, you are running your code (the HTML, CSS, and JavaScript) inside an execution environment (the browser tab). This is like a factory that takes in raw materials (the code) and outputs a product (the web page).A very common use of JavaScript is to dynamically modify HTML and CSS to update a user interface, via the Document Object Model API (as mentioned above). Note that the code in your web documents is generally loaded and executed in the order it appears on the page. Errors may occur if JavaScript is loaded and run before the HTML and CSS that it is intended to modify. You will learn ways around this later in the article, in the Script loading strategies section.