SlideShare a Scribd company logo
Arulkumar V
Asst.Professor- CSE
SECE
JavaScript
Javascript
 JavaScript is a lightweight, interpreted programming
language.
 It is designed for creating network-centric applications. It
is complimentary to and integrated with Java.
 JavaScript is very easy to implement because it is
integrated with HTML.
 It is open and cross-platform.
Client-side JavaScript
 Client-side JavaScript is the most common form of the
language.
 The script should be included in or referenced by an
HTML document for the code to be interpreted by the
browser.
 Programs interact with the user, control the browser, and
dynamically create HTML content.
Javascript Example
<html>
<body>
<script language="javascript" type="text/javascript">
document.write("Hello World!")
</script>
</body>
</html>
Advantages of JavaScript
 Less server interaction
 Immediate feedback to the visitors
 Increased interactivity
 Richer interfaces
Limitations of JavaScript
 Client-side JavaScript does not allow the reading or riting
of files. Security reason.
 Cannot be used for networking applications, there is no
such support available.
 Doesn't have any multithreading or multiprocessor
capabilities.
JavaScript Exmple
<html>
<body onload = checkscope();>
<script type = "text/javascript">
var myVar = "global"; // Declare a global variable function
checkscope( )
{
var myVar = "local"; // Declare a local variable
document.write(myVar); }
</script>
</body>
</html>
JavaScript Basic Form Validation
if( document.myForm.EMail.value == “ “ )
{
alert( "Please provide your Email!" );
document.myForm.EMail.focus();
return false;
}
Should writtern with html form
Email Validation
function validateEmail()
{
var emailID = document.myForm.EMail.value;
atpos = emailID.indexOf("@");
dotpos = emailID.lastIndexOf(".");
if (atpos < 1 || ( dotpos - atpos < 2 ))
{
alert("Please enter correct email ID")
document.myForm.EMail.focus();
return false;
}
return( true );
}
1.java script

More Related Content

PPTX
Component-driven development with AngularJS
PDF
Web Vulnerabilities_NGAN Seok Chern
PDF
Rest Introduction (Chris Jimenez)
ODP
Introduction to Seam Applications
DOC
NishantSankhalaCV
PDF
Best PHP Frameworks 2013
PPT
MarvelSoft SchoolAdmin Dev Framework
PPT
Developing Profitable APIs - John Fraser - Platform A
Component-driven development with AngularJS
Web Vulnerabilities_NGAN Seok Chern
Rest Introduction (Chris Jimenez)
Introduction to Seam Applications
NishantSankhalaCV
Best PHP Frameworks 2013
MarvelSoft SchoolAdmin Dev Framework
Developing Profitable APIs - John Fraser - Platform A

What's hot (18)

PPT
Testable client side_mvc_apps_in_javascript
PPTX
Introduction to JavaScript - Code Heroku
PDF
Frontend Fiesta
PPT
Introduction to JavaScript Full Stack
PPTX
Sug bangalore - front end coding workflow for sitecore sites
PPTX
Introduction to Django
PDF
Fullstack_Academy_Flex_Immersive_Syllabus
PDF
Developing SPI applications using Grails and AngularJS
PPTX
Single-page applications and Grails
PPTX
List of 7 popular java frameworks for 2019
PPTX
Back to the Basics - 1 - Introduction to Web Development
ODP
What's Our Software Doing With All That User Input
PPTX
Module 1
PPTX
What is ASP.NET MVC
PPTX
Full stack devlopment using django main ppt
PPTX
Introduction to web compoents
PDF
gaurav_cv
PPTX
Web application framework
Testable client side_mvc_apps_in_javascript
Introduction to JavaScript - Code Heroku
Frontend Fiesta
Introduction to JavaScript Full Stack
Sug bangalore - front end coding workflow for sitecore sites
Introduction to Django
Fullstack_Academy_Flex_Immersive_Syllabus
Developing SPI applications using Grails and AngularJS
Single-page applications and Grails
List of 7 popular java frameworks for 2019
Back to the Basics - 1 - Introduction to Web Development
What's Our Software Doing With All That User Input
Module 1
What is ASP.NET MVC
Full stack devlopment using django main ppt
Introduction to web compoents
gaurav_cv
Web application framework
Ad

Similar to 1.java script (20)

PPTX
BEAAUTIFUL presentation of java
PPTX
Introduction to Java Script
PPTX
Front End Development | Introduction
PPTX
Unit 4 Java script.pptx
PPTX
Java script
PPTX
Online test management system
PPTX
JavaScript New Tutorial Class XI and XII.pptx
DOC
Java script by Act Academy
PDF
JS BASICS JAVA SCRIPT SCRIPTING
PPTX
Java script Session No 1
DOC
Basics java scripts
PPT
JAVA SCRIPT
PDF
Web programming UNIT II by Bhavsingh Maloth
PDF
WEB PROGRAMMING UNIT II BY BHAVSINGH MALOTH
PPTX
Java script Basic
PDF
Making Of PHP Based Web Application
PPT
basics of javascript and fundamentals ppt
PPT
JS-Slides_for_begineers_javascript-1.ppt
PPT
JS-Slides-1 (1).ppt vbefgvsdfgdfgfggergertgrtgrtgt
PPT
Javascript overview and introduction to js
BEAAUTIFUL presentation of java
Introduction to Java Script
Front End Development | Introduction
Unit 4 Java script.pptx
Java script
Online test management system
JavaScript New Tutorial Class XI and XII.pptx
Java script by Act Academy
JS BASICS JAVA SCRIPT SCRIPTING
Java script Session No 1
Basics java scripts
JAVA SCRIPT
Web programming UNIT II by Bhavsingh Maloth
WEB PROGRAMMING UNIT II BY BHAVSINGH MALOTH
Java script Basic
Making Of PHP Based Web Application
basics of javascript and fundamentals ppt
JS-Slides_for_begineers_javascript-1.ppt
JS-Slides-1 (1).ppt vbefgvsdfgdfgfggergertgrtgrtgt
Javascript overview and introduction to js
Ad

More from PhD Research Scholar (20)

PPTX
Quiz servlet
PPTX
servlet db connectivity
PPTX
2.java script dom
PPTX
Quiz javascript
PPTX
Thread&amp;multithread
PPTX
Streams&amp;io
PPTX
PPTX
Interface in java
PPTX
Inner classes in java
PPTX
PPTX
Exception handling
PPTX
Abstract class
PPTX
7. tuples, set &amp; dictionary
PPTX
PPTX
4. functions
Quiz servlet
servlet db connectivity
2.java script dom
Quiz javascript
Thread&amp;multithread
Streams&amp;io
Interface in java
Inner classes in java
Exception handling
Abstract class
7. tuples, set &amp; dictionary
4. functions

Recently uploaded (20)

PDF
Microbial disease of the cardiovascular and lymphatic systems
PPTX
BOWEL ELIMINATION FACTORS AFFECTING AND TYPES
PPTX
Cell Types and Its function , kingdom of life
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PDF
Classroom Observation Tools for Teachers
PPTX
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
PDF
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
PDF
01-Introduction-to-Information-Management.pdf
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PPTX
Week 4 Term 3 Study Techniques revisited.pptx
PPTX
Cell Structure & Organelles in detailed.
PDF
Business Ethics Teaching Materials for college
PDF
Mark Klimek Lecture Notes_240423 revision books _173037.pdf
PPTX
Renaissance Architecture: A Journey from Faith to Humanism
PDF
Pre independence Education in Inndia.pdf
PDF
TR - Agricultural Crops Production NC III.pdf
PDF
Origin of periodic table-Mendeleev’s Periodic-Modern Periodic table
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
Microbial disease of the cardiovascular and lymphatic systems
BOWEL ELIMINATION FACTORS AFFECTING AND TYPES
Cell Types and Its function , kingdom of life
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
Classroom Observation Tools for Teachers
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
01-Introduction-to-Information-Management.pdf
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
Week 4 Term 3 Study Techniques revisited.pptx
Cell Structure & Organelles in detailed.
Business Ethics Teaching Materials for college
Mark Klimek Lecture Notes_240423 revision books _173037.pdf
Renaissance Architecture: A Journey from Faith to Humanism
Pre independence Education in Inndia.pdf
TR - Agricultural Crops Production NC III.pdf
Origin of periodic table-Mendeleev’s Periodic-Modern Periodic table
Module 4: Burden of Disease Tutorial Slides S2 2025
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx

1.java script

  • 2. Javascript  JavaScript is a lightweight, interpreted programming language.  It is designed for creating network-centric applications. It is complimentary to and integrated with Java.  JavaScript is very easy to implement because it is integrated with HTML.  It is open and cross-platform.
  • 3. Client-side JavaScript  Client-side JavaScript is the most common form of the language.  The script should be included in or referenced by an HTML document for the code to be interpreted by the browser.  Programs interact with the user, control the browser, and dynamically create HTML content.
  • 4. Javascript Example <html> <body> <script language="javascript" type="text/javascript"> document.write("Hello World!") </script> </body> </html>
  • 5. Advantages of JavaScript  Less server interaction  Immediate feedback to the visitors  Increased interactivity  Richer interfaces
  • 6. Limitations of JavaScript  Client-side JavaScript does not allow the reading or riting of files. Security reason.  Cannot be used for networking applications, there is no such support available.  Doesn't have any multithreading or multiprocessor capabilities.
  • 7. JavaScript Exmple <html> <body onload = checkscope();> <script type = "text/javascript"> var myVar = "global"; // Declare a global variable function checkscope( ) { var myVar = "local"; // Declare a local variable document.write(myVar); } </script> </body> </html>
  • 8. JavaScript Basic Form Validation if( document.myForm.EMail.value == “ “ ) { alert( "Please provide your Email!" ); document.myForm.EMail.focus(); return false; } Should writtern with html form
  • 9. Email Validation function validateEmail() { var emailID = document.myForm.EMail.value; atpos = emailID.indexOf("@"); dotpos = emailID.lastIndexOf("."); if (atpos < 1 || ( dotpos - atpos < 2 )) { alert("Please enter correct email ID") document.myForm.EMail.focus(); return false; } return( true ); }