SlideShare a Scribd company logo
INTRODUCTION OF JAVASCRIPT




What is JavaScript?

JavaScript (sometimes abbreviated JS) is a prototype-based scripting language that
is dynamic, weakly typed and has first-class functions. It is a multi-paradigm language,
supporting object-oriented, imperative, and functional programming styles. JavaScript is
an implementation of the ECMAScript language standard and is typically used to enable
programmatic access to computational objects within a host environment. JavaScript is a
programming language used to make web pages interactive. It runs on your visitor's
computer and doesn't require constant downloads from your website. JavaScript is often
used to create polls and quizzes. It is the standard language used in web pages, but it is
also widely used by desktop apps, mobile phone apps, and internet servers.

Why we use JavaScript?

JavaScript is not specifically HTML related, but interacts with HTML and DHTML when
used in a browser. It's a more traditional programming language, in that you can write a
series of instructions to compute what kinds of actions should be taken based on various
conditions, repeat things a variable number of times, and just generally take more complex
and sophisticated actions. Small applications and games have been written entirely in
JavaScript.


The line between DHTML and JavaScript can sometimes get blurry, but a rule of thumb I
use is simple: DHTML is about the web page, period. The items on a web page, the events
that a web page might want to act on (like moving your mouse over text), and the resulting
changes to the web page that you might want to have happen resulting from those events
(like changing the color of text). JavaScript, however, is really web, and HTML,
independent. It adds programming things like loops, and variables and functions. You could
write a small program to calculate Pi in JavaScript, and then perhaps use DHTML to do
something interesting on the web page with it.
What is the purpose of JavaScript?

Functions allow us to remove these statements from all of the places that they are needed
and define them just once. We then “call” the function from each of the places where we
need those statements to run. This makes maintaining the code easier as we only have one
place where the particular series of statements occurs rather than repetitions of the
same code. Any changes to that one block will automatically apply to each place where the
function is called.Using functions also allows us to modularize our approach to writing the
code. This means that we can break up the processing into sections and not concern
ourselves with how all of the processing needs to work all at the same time. When we are
coding the function we need only concern ourselves with how the function needs to be
coded in order to perform its intended task.


JavaScript program:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>zoya</title>

<script type="text/javascript">

functionabc()

{

         var a=document.getElementById('un').value;




                if(a=="")

    {

alert("Must be enter name");
return false;

 }

       var p=document.getElementById('pwd').value;

       if(p=="")

       {

                alert("must enter pasword");

                return false;

                }

       if(p.length<8)

       {

                alert("password too Short");

                return false;

                }

       if(p.length>=14)

       {

                alert("password too long");

                return false;

                }

       var e=document.getElementById('em').value;

       em.indexof("@")

       if(e==-1)

       {

       alert("must enter @");
return false;

         }

         em.indexof(".")

         if(e==-1)

         {

         alert("must enter .");

         return false;

         }



}

</script>

</head>




<body>




<form>

Username:

<input type="text" name="uname" id="un"/>

<br/>

<br/>

Password:

<input type="password" id="pwd"/>

<br/>
<br/>

E-mail:

<input type="text" name="mal" id="em"/>

<br/>

<br/>



<input type="submit" value="login" onclick="return abc()" />

</form>

</body>

</html>

More Related Content

PPTX
Java Script
husbancom
 
PPTX
JavaScript with Syntax & Implementation
Soumen Santra
 
PPT
Java script
ITz_1
 
PPT
Java Script
siddaram
 
PPTX
Java script writing javascript
Jesus Obenita Jr.
 
PPT
JavaScript - Part-1
Jainul Musani
 
PPTX
Introduction to Java Script
Vijay Kumar Verma
 
Java Script
husbancom
 
JavaScript with Syntax & Implementation
Soumen Santra
 
Java script
ITz_1
 
Java Script
siddaram
 
Java script writing javascript
Jesus Obenita Jr.
 
JavaScript - Part-1
Jainul Musani
 
Introduction to Java Script
Vijay Kumar Verma
 

What's hot (19)

PPT
JavaScript Introduction
Jainul Musani
 
PPTX
Java Script An Introduction By HWA
Emma Wood
 
PPTX
Java Script
Dr. SURBHI SAROHA
 
PPT
HTML Introduction
Jainul Musani
 
PPT
Java script
umesh patil
 
PPT
Scripting languages
teach4uin
 
PPT
Java script programs
ITz_1
 
PPT
Javascript by geetanjali
Geetanjali Bhosale
 
DOCX
Javascript tutorial
Abhishek Kesharwani
 
PPTX
Javascripts. pptt
RaviShankarSinghal
 
PPT
Java script
Fajar Baskoro
 
PDF
Introduction to html & css
sesharao puvvada
 
PPTX
Introduction to java_script
Basavaraj Hampali
 
PPTX
Intro to java script
londiem
 
PPT
JavaScript Missing Manual, Ch. 1
Gene Babon
 
PDF
Javascript
Momentum Design Lab
 
PDF
JAVA SCRIPT
Mohammed Hussein
 
PPT
Java script
umesh patil
 
JavaScript Introduction
Jainul Musani
 
Java Script An Introduction By HWA
Emma Wood
 
Java Script
Dr. SURBHI SAROHA
 
HTML Introduction
Jainul Musani
 
Java script
umesh patil
 
Scripting languages
teach4uin
 
Java script programs
ITz_1
 
Javascript by geetanjali
Geetanjali Bhosale
 
Javascript tutorial
Abhishek Kesharwani
 
Javascripts. pptt
RaviShankarSinghal
 
Java script
Fajar Baskoro
 
Introduction to html & css
sesharao puvvada
 
Introduction to java_script
Basavaraj Hampali
 
Intro to java script
londiem
 
JavaScript Missing Manual, Ch. 1
Gene Babon
 
JAVA SCRIPT
Mohammed Hussein
 
Java script
umesh patil
 
Ad

Viewers also liked (6)

PPTX
Sony nextep
syeda zoya mehdi
 
DOCX
Mobile phone calling and texting college students in pakistan
syeda zoya mehdi
 
PPTX
Android vs window
syeda zoya mehdi
 
DOCX
Maslow, herzberg, mc clelland, ouchi, thamhain and wilemon and convey theories
syeda zoya mehdi
 
PPTX
Game playing in artificial intelligent technique
syeda zoya mehdi
 
Sony nextep
syeda zoya mehdi
 
Mobile phone calling and texting college students in pakistan
syeda zoya mehdi
 
Android vs window
syeda zoya mehdi
 
Maslow, herzberg, mc clelland, ouchi, thamhain and wilemon and convey theories
syeda zoya mehdi
 
Game playing in artificial intelligent technique
syeda zoya mehdi
 
Ad

Similar to Introduction of javascript (20)

PPTX
BITM3730Week6.pptx
MattMarino13
 
PPTX
BITM3730 10-4.pptx
MattMarino13
 
PPTX
BITM3730 10-3.pptx
MattMarino13
 
DOC
javscript
rcc1964
 
PPTX
An introduction to javascript
tonyh1
 
PPTX
gdscWorkShopJavascriptintroductions.pptx
sandeshshahapur
 
PDF
Intro to javascript (5:2)
Thinkful
 
PPT
FSJavaScript.ppt
AbhishekKumar66407
 
PDF
Intro to Programming for Communicators - Hacks/Hackers ATX
Cindy Royal
 
PPTX
MYSQL DATABASE INTRODUCTION TO JAVASCRIPT.pptx
ArjayBalberan1
 
PPTX
Java script
Rajkiran Mummadi
 
PDF
Unit 4(it workshop)
Dr.Lokesh Gagnani
 
PPT
Javascript 2009
borkweb
 
PPTX
unit4 wp.pptxjvlbpuvghuigv8ytg2ugvugvuygv
utsavsd11
 
PPTX
An Introduction to JavaScript
tonyh1
 
PPT
Javascript1
anas Mohtaseb
 
PPTX
Introduction to JavaScript - Web Programming
tyfeng7
 
PDF
Thinkful - Intro to JavaScript
TJ Stalcup
 
PPT
1472251766_demojavascriptppt (1).ppt
ictlab3
 
PPTX
BITM3730 10-17.pptx
MattMarino13
 
BITM3730Week6.pptx
MattMarino13
 
BITM3730 10-4.pptx
MattMarino13
 
BITM3730 10-3.pptx
MattMarino13
 
javscript
rcc1964
 
An introduction to javascript
tonyh1
 
gdscWorkShopJavascriptintroductions.pptx
sandeshshahapur
 
Intro to javascript (5:2)
Thinkful
 
FSJavaScript.ppt
AbhishekKumar66407
 
Intro to Programming for Communicators - Hacks/Hackers ATX
Cindy Royal
 
MYSQL DATABASE INTRODUCTION TO JAVASCRIPT.pptx
ArjayBalberan1
 
Java script
Rajkiran Mummadi
 
Unit 4(it workshop)
Dr.Lokesh Gagnani
 
Javascript 2009
borkweb
 
unit4 wp.pptxjvlbpuvghuigv8ytg2ugvugvuygv
utsavsd11
 
An Introduction to JavaScript
tonyh1
 
Javascript1
anas Mohtaseb
 
Introduction to JavaScript - Web Programming
tyfeng7
 
Thinkful - Intro to JavaScript
TJ Stalcup
 
1472251766_demojavascriptppt (1).ppt
ictlab3
 
BITM3730 10-17.pptx
MattMarino13
 

Recently uploaded (20)

PDF
The Evolution of KM Roles (Presented at Knowledge Summit Dublin 2025)
Enterprise Knowledge
 
PPTX
Comunidade Salesforce São Paulo - Desmistificando o Omnistudio (Vlocity)
Francisco Vieira Júnior
 
PDF
Oracle AI Vector Search- Getting Started and what's new in 2025- AIOUG Yatra ...
Sandesh Rao
 
PDF
Why Your AI & Cybersecurity Hiring Still Misses the Mark in 2025
Virtual Employee Pvt. Ltd.
 
PDF
DevOps & Developer Experience Summer BBQ
AUGNYC
 
PDF
Make GenAI investments go further with the Dell AI Factory - Infographic
Principled Technologies
 
DOCX
Top AI API Alternatives to OpenAI: A Side-by-Side Breakdown
vilush
 
PDF
CIFDAQ's Token Spotlight: SKY - A Forgotten Giant's Comeback?
CIFDAQ
 
PDF
madgavkar20181017ppt McKinsey Presentation.pdf
georgschmitzdoerner
 
PDF
solutions_manual_-_materials___processing_in_manufacturing__demargo_.pdf
AbdullahSani29
 
PPTX
Smart Infrastructure and Automation through IoT Sensors
Rejig Digital
 
PPTX
C Programming Basics concept krnppt.pptx
Karan Prajapat
 
PDF
REPORT: Heating appliances market in Poland 2024
SPIUG
 
PDF
Security features in Dell, HP, and Lenovo PC systems: A research-based compar...
Principled Technologies
 
PDF
Google’s NotebookLM Unveils Video Overviews
SOFTTECHHUB
 
PPTX
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
PPTX
How to Build a Scalable Micro-Investing Platform in 2025 - A Founder’s Guide ...
Third Rock Techkno
 
PDF
NewMind AI Monthly Chronicles - July 2025
NewMind AI
 
PDF
Using Anchore and DefectDojo to Stand Up Your DevSecOps Function
Anchore
 
PDF
How Onsite IT Support Drives Business Efficiency, Security, and Growth.pdf
Captain IT
 
The Evolution of KM Roles (Presented at Knowledge Summit Dublin 2025)
Enterprise Knowledge
 
Comunidade Salesforce São Paulo - Desmistificando o Omnistudio (Vlocity)
Francisco Vieira Júnior
 
Oracle AI Vector Search- Getting Started and what's new in 2025- AIOUG Yatra ...
Sandesh Rao
 
Why Your AI & Cybersecurity Hiring Still Misses the Mark in 2025
Virtual Employee Pvt. Ltd.
 
DevOps & Developer Experience Summer BBQ
AUGNYC
 
Make GenAI investments go further with the Dell AI Factory - Infographic
Principled Technologies
 
Top AI API Alternatives to OpenAI: A Side-by-Side Breakdown
vilush
 
CIFDAQ's Token Spotlight: SKY - A Forgotten Giant's Comeback?
CIFDAQ
 
madgavkar20181017ppt McKinsey Presentation.pdf
georgschmitzdoerner
 
solutions_manual_-_materials___processing_in_manufacturing__demargo_.pdf
AbdullahSani29
 
Smart Infrastructure and Automation through IoT Sensors
Rejig Digital
 
C Programming Basics concept krnppt.pptx
Karan Prajapat
 
REPORT: Heating appliances market in Poland 2024
SPIUG
 
Security features in Dell, HP, and Lenovo PC systems: A research-based compar...
Principled Technologies
 
Google’s NotebookLM Unveils Video Overviews
SOFTTECHHUB
 
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
How to Build a Scalable Micro-Investing Platform in 2025 - A Founder’s Guide ...
Third Rock Techkno
 
NewMind AI Monthly Chronicles - July 2025
NewMind AI
 
Using Anchore and DefectDojo to Stand Up Your DevSecOps Function
Anchore
 
How Onsite IT Support Drives Business Efficiency, Security, and Growth.pdf
Captain IT
 

Introduction of javascript

  • 1. INTRODUCTION OF JAVASCRIPT What is JavaScript? JavaScript (sometimes abbreviated JS) is a prototype-based scripting language that is dynamic, weakly typed and has first-class functions. It is a multi-paradigm language, supporting object-oriented, imperative, and functional programming styles. JavaScript is an implementation of the ECMAScript language standard and is typically used to enable programmatic access to computational objects within a host environment. JavaScript is a programming language used to make web pages interactive. It runs on your visitor's computer and doesn't require constant downloads from your website. JavaScript is often used to create polls and quizzes. It is the standard language used in web pages, but it is also widely used by desktop apps, mobile phone apps, and internet servers. Why we use JavaScript? JavaScript is not specifically HTML related, but interacts with HTML and DHTML when used in a browser. It's a more traditional programming language, in that you can write a series of instructions to compute what kinds of actions should be taken based on various conditions, repeat things a variable number of times, and just generally take more complex and sophisticated actions. Small applications and games have been written entirely in JavaScript. The line between DHTML and JavaScript can sometimes get blurry, but a rule of thumb I use is simple: DHTML is about the web page, period. The items on a web page, the events that a web page might want to act on (like moving your mouse over text), and the resulting changes to the web page that you might want to have happen resulting from those events (like changing the color of text). JavaScript, however, is really web, and HTML, independent. It adds programming things like loops, and variables and functions. You could write a small program to calculate Pi in JavaScript, and then perhaps use DHTML to do something interesting on the web page with it.
  • 2. What is the purpose of JavaScript? Functions allow us to remove these statements from all of the places that they are needed and define them just once. We then “call” the function from each of the places where we need those statements to run. This makes maintaining the code easier as we only have one place where the particular series of statements occurs rather than repetitions of the same code. Any changes to that one block will automatically apply to each place where the function is called.Using functions also allows us to modularize our approach to writing the code. This means that we can break up the processing into sections and not concern ourselves with how all of the processing needs to work all at the same time. When we are coding the function we need only concern ourselves with how the function needs to be coded in order to perform its intended task. JavaScript program: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>zoya</title> <script type="text/javascript"> functionabc() { var a=document.getElementById('un').value; if(a=="") { alert("Must be enter name");
  • 3. return false; } var p=document.getElementById('pwd').value; if(p=="") { alert("must enter pasword"); return false; } if(p.length<8) { alert("password too Short"); return false; } if(p.length>=14) { alert("password too long"); return false; } var e=document.getElementById('em').value; em.indexof("@") if(e==-1) { alert("must enter @");
  • 4. return false; } em.indexof(".") if(e==-1) { alert("must enter ."); return false; } } </script> </head> <body> <form> Username: <input type="text" name="uname" id="un"/> <br/> <br/> Password: <input type="password" id="pwd"/> <br/>
  • 5. <br/> E-mail: <input type="text" name="mal" id="em"/> <br/> <br/> <input type="submit" value="login" onclick="return abc()" /> </form> </body> </html>