SlideShare a Scribd company logo
Java script writing javascript
• Discuss the syntax in writing the
  JavaScript in the HTML
  documents.
• Apply the basic JavaScript
  command in displaying text in an
  HTML documents.
• It is an object-oriented, client
  based scripting language
  created by Netscape
  programmer, Brendan Eich.
• What can you do using
  JavaScript?
JavaScript syntax
<html>                             <html>
<head><title>JS<title>             <head><title>JS<title>
</head>                            </head>
<script type= “text/javascript”>   <script language= “Javascript”>
alert(“Welcome to the World        alert(“Welcome to the World
   of Dynamic Programming”);          of Dynamic Programming”);
</script>                          </script>
<body>                             <body>
</body>                            </body>
</html>                            </html>
The <SCRIPT> and </SCRIPT> tags are the main way of
   connecting JavaScript code to HTML. You are free to
 embed as many scripts into a single HTML document as
         you like using multiple <SCRIPT> tags.
Script tags                      What it does
<script language= “JavaScript>   Tells your browser that JavaScript
                                 code is about to appear
alert(“Welcome….”);              -Statements
                                 (object, properties, function, vari
                                 ables , methods, and events.
                                 -Semi colon terminates the
                                 statements
</script>                        Tells the browser that the
                                 JavaScript code is all done and it
                                 can go back to HTML code
DISPLAYING TEXT
• <html>
• <body>
• <script type= “text/javascript”>
• document.write(“Welcome to the World of
  Dynamic Web Programming!”)
• </script>
• Note: The word document.write is a standard JavaScript command
  for displaying text/output in a page.
• The entire line document.write(“Welcome…!”) is called as
  statements
• document is the object name and write is the property name.
• Notice that a dot (.) is used to separate the object name from a
  property name. This is the syntax to access the property of an
  object
SUMMARY
     Writing/Scripting in JavaScript
   JavaScript code is typically embedded in the
   HTML, to be interpreted and run by the client's
   browser. Here are some tips to remember when
   writing JavaScript commands.
• JavaScript appears within the <Head> and <Body>
   sections of an HTML document.
• JavaScript code is case sensitive
• White space between words and tabs are ignored
• Line breaks are ignored except within a statement
• JavaScript statements end with a semi- colon (;)
• A JavaScript code is a sequence of statements
  that can be embedded into an HTML page and
  executed directly by a Web browser to generate
  dynamic HTML page.
• Scripting in JavaScript entails working with
  objects, which you can create yourself or use
  those built-in the language.
• You can access information(properties) about the
  objects, perform actions(methods) on them and
  responds(event handler) to the events that
  happen to them.
• Objects, properties, methods, and event handlers
  are the building blocks of JavaScript programs.
CompuQuiz/Exercises/Evaluation
1. Write the JavaScript Syntax.
2. What is the script tag tells the browser that a
   JavaScript code is about to appear?
3. It what part or sections of the HTML documents
   where script tags can be written?
4. What is the basic JavaScript code or command
   for displaying text in you HTML documents?
5. What symbols it use to terminate a JavaScript
   statements?
Assignment
1. Research on the following JavaScript
  commands.
• Alert
• Confirm

2. What is the purpose of the alert and confirm
  script commands in a web page?

More Related Content

What's hot (20)

Introduction of javascript
Introduction of javascriptIntroduction of javascript
Introduction of javascript
syeda zoya mehdi
 
Javascript
JavascriptJavascript
Javascript
Mayank Bhatt
 
JAVA SCRIPT
JAVA SCRIPTJAVA SCRIPT
JAVA SCRIPT
Go4Guru
 
Javascript
JavascriptJavascript
Javascript
Mozxai
 
Introduction to html & css
Introduction to html & cssIntroduction to html & css
Introduction to html & css
sesharao puvvada
 
Test2
Test2Test2
Test2
Ermias Hailemicheal
 
HTML Introduction
HTML IntroductionHTML Introduction
HTML Introduction
Jainul Musani
 
Javascript by geetanjali
Javascript by geetanjaliJavascript by geetanjali
Javascript by geetanjali
Geetanjali Bhosale
 
Javascript tutorial
Javascript tutorialJavascript tutorial
Javascript tutorial
Abhishek Kesharwani
 
Javascripts. pptt
Javascripts. ppttJavascripts. pptt
Javascripts. pptt
RaviShankarSinghal
 
Java script Session No 1
Java script Session No 1Java script Session No 1
Java script Session No 1
Saif Ullah Dar
 
Web development basics (Part-4)
Web development basics (Part-4)Web development basics (Part-4)
Web development basics (Part-4)
Rajat Pratap Singh
 
Js syntax
Js syntaxJs syntax
Js syntax
Sireesh K
 
Js mod1
Js mod1Js mod1
Js mod1
VARSHAKUMARI49
 
Js ppt
Js pptJs ppt
Js ppt
Rakhi Thota
 
Javascript
JavascriptJavascript
Javascript
Manav Prasad
 
Javascript
JavascriptJavascript
Javascript
Momentum Design Lab
 
Javascript
JavascriptJavascript
Javascript
Iblesoft
 
JavaScript: Implementations And Applications
JavaScript: Implementations And ApplicationsJavaScript: Implementations And Applications
JavaScript: Implementations And Applications
Pragya Pai
 
Introduction to Jquery
Introduction to JqueryIntroduction to Jquery
Introduction to Jquery
Gurpreet singh
 

Viewers also liked (8)

Word processor
Word processorWord processor
Word processor
Piangga Wijaya
 
Alternative Word Processors
Alternative Word ProcessorsAlternative Word Processors
Alternative Word Processors
Greg Dhuyvetter
 
Word processors in the classroom
Word processors in the classroomWord processors in the classroom
Word processors in the classroom
Neny Isharyanti
 
Word processor
Word processorWord processor
Word processor
Jesus Obenita Jr.
 
The Word Processor
The Word ProcessorThe Word Processor
The Word Processor
RebeccaC
 
Data and Information Visualization: the Principles of Infographics - English ...
Data and Information Visualization: the Principles of Infographics - English ...Data and Information Visualization: the Principles of Infographics - English ...
Data and Information Visualization: the Principles of Infographics - English ...
Dr Bijan Yavar
 
Word processors in the classroom
Word processors in the classroomWord processors in the classroom
Word processors in the classroom
David Mendocoreas
 
Word processor in the classroom
Word processor in the classroomWord processor in the classroom
Word processor in the classroom
Luphiie Lyaa
 
Alternative Word Processors
Alternative Word ProcessorsAlternative Word Processors
Alternative Word Processors
Greg Dhuyvetter
 
Word processors in the classroom
Word processors in the classroomWord processors in the classroom
Word processors in the classroom
Neny Isharyanti
 
The Word Processor
The Word ProcessorThe Word Processor
The Word Processor
RebeccaC
 
Data and Information Visualization: the Principles of Infographics - English ...
Data and Information Visualization: the Principles of Infographics - English ...Data and Information Visualization: the Principles of Infographics - English ...
Data and Information Visualization: the Principles of Infographics - English ...
Dr Bijan Yavar
 
Word processors in the classroom
Word processors in the classroomWord processors in the classroom
Word processors in the classroom
David Mendocoreas
 
Word processor in the classroom
Word processor in the classroomWord processor in the classroom
Word processor in the classroom
Luphiie Lyaa
 
Ad

Similar to Java script writing javascript (20)

Java script how to
Java script how toJava script how to
Java script how to
julian vega
 
Basic JavaScript Tutorial
Basic JavaScript TutorialBasic JavaScript Tutorial
Basic JavaScript Tutorial
DHTMLExtreme
 
2javascript web programming with JAVA script
2javascript web programming with JAVA script2javascript web programming with JAVA script
2javascript web programming with JAVA script
umardanjumamaiwada
 
Java script by Act Academy
Java script by Act AcademyJava script by Act Academy
Java script by Act Academy
actanimation
 
Javascript
JavascriptJavascript
Javascript
Sushma M
 
Introduction to java script
Introduction to java scriptIntroduction to java script
Introduction to java script
nanjil1984
 
Internet Based Programming -3-JAVASCRIPT
Internet Based Programming -3-JAVASCRIPTInternet Based Programming -3-JAVASCRIPT
Internet Based Programming -3-JAVASCRIPT
stevecom2010
 
8.-Javascript-report powerpoint presentation
8.-Javascript-report powerpoint presentation8.-Javascript-report powerpoint presentation
8.-Javascript-report powerpoint presentation
JohnLagman3
 
JS BASICS JAVA SCRIPT SCRIPTING
JS BASICS JAVA SCRIPT SCRIPTINGJS BASICS JAVA SCRIPT SCRIPTING
JS BASICS JAVA SCRIPT SCRIPTING
Arulkumar
 
JavaScriptL18 [Autosaved].pptx
JavaScriptL18 [Autosaved].pptxJavaScriptL18 [Autosaved].pptx
JavaScriptL18 [Autosaved].pptx
VivekBaghel30
 
CS8651- Unit 2 - JS.internet programming paper anna university -2017 regulation
CS8651- Unit 2 - JS.internet programming paper anna university -2017 regulationCS8651- Unit 2 - JS.internet programming paper anna university -2017 regulation
CS8651- Unit 2 - JS.internet programming paper anna university -2017 regulation
amrashbhanuabdul
 
WEB PROGRAMMING UNIT II BY BHAVSINGH MALOTH
WEB PROGRAMMING UNIT II BY BHAVSINGH MALOTHWEB PROGRAMMING UNIT II BY BHAVSINGH MALOTH
WEB PROGRAMMING UNIT II BY BHAVSINGH MALOTH
Bhavsingh Maloth
 
Web programming UNIT II by Bhavsingh Maloth
Web programming UNIT II by Bhavsingh MalothWeb programming UNIT II by Bhavsingh Maloth
Web programming UNIT II by Bhavsingh Maloth
Bhavsingh Maloth
 
JavaScript_III.pptx
JavaScript_III.pptxJavaScript_III.pptx
JavaScript_III.pptx
rashmiisrani1
 
Unit 4 Java script.pptx
Unit 4 Java script.pptxUnit 4 Java script.pptx
Unit 4 Java script.pptx
Gangesh8
 
Unit5_Web_Updvvgxsvjbffcvvgbjifszated.pptx
Unit5_Web_Updvvgxsvjbffcvvgbjifszated.pptxUnit5_Web_Updvvgxsvjbffcvvgbjifszated.pptx
Unit5_Web_Updvvgxsvjbffcvvgbjifszated.pptx
1si23bt001
 
IT2255 Web Essentials - Unit III Client-Side Processing and Scripting
IT2255 Web Essentials - Unit III Client-Side Processing and ScriptingIT2255 Web Essentials - Unit III Client-Side Processing and Scripting
IT2255 Web Essentials - Unit III Client-Side Processing and Scripting
pkaviya
 
Java Script basics and DOM
Java Script basics and DOMJava Script basics and DOM
Java Script basics and DOM
Sukrit Gupta
 
WT UNIT 2 presentation :client side technologies JavaScript And Dom
WT UNIT 2 presentation :client side technologies JavaScript And DomWT UNIT 2 presentation :client side technologies JavaScript And Dom
WT UNIT 2 presentation :client side technologies JavaScript And Dom
SrushtiGhise
 
Introduction to Java Scripting
Introduction to Java ScriptingIntroduction to Java Scripting
Introduction to Java Scripting
fantasticdigitaltools
 
Java script how to
Java script how toJava script how to
Java script how to
julian vega
 
Basic JavaScript Tutorial
Basic JavaScript TutorialBasic JavaScript Tutorial
Basic JavaScript Tutorial
DHTMLExtreme
 
2javascript web programming with JAVA script
2javascript web programming with JAVA script2javascript web programming with JAVA script
2javascript web programming with JAVA script
umardanjumamaiwada
 
Java script by Act Academy
Java script by Act AcademyJava script by Act Academy
Java script by Act Academy
actanimation
 
Javascript
JavascriptJavascript
Javascript
Sushma M
 
Introduction to java script
Introduction to java scriptIntroduction to java script
Introduction to java script
nanjil1984
 
Internet Based Programming -3-JAVASCRIPT
Internet Based Programming -3-JAVASCRIPTInternet Based Programming -3-JAVASCRIPT
Internet Based Programming -3-JAVASCRIPT
stevecom2010
 
8.-Javascript-report powerpoint presentation
8.-Javascript-report powerpoint presentation8.-Javascript-report powerpoint presentation
8.-Javascript-report powerpoint presentation
JohnLagman3
 
JS BASICS JAVA SCRIPT SCRIPTING
JS BASICS JAVA SCRIPT SCRIPTINGJS BASICS JAVA SCRIPT SCRIPTING
JS BASICS JAVA SCRIPT SCRIPTING
Arulkumar
 
JavaScriptL18 [Autosaved].pptx
JavaScriptL18 [Autosaved].pptxJavaScriptL18 [Autosaved].pptx
JavaScriptL18 [Autosaved].pptx
VivekBaghel30
 
CS8651- Unit 2 - JS.internet programming paper anna university -2017 regulation
CS8651- Unit 2 - JS.internet programming paper anna university -2017 regulationCS8651- Unit 2 - JS.internet programming paper anna university -2017 regulation
CS8651- Unit 2 - JS.internet programming paper anna university -2017 regulation
amrashbhanuabdul
 
WEB PROGRAMMING UNIT II BY BHAVSINGH MALOTH
WEB PROGRAMMING UNIT II BY BHAVSINGH MALOTHWEB PROGRAMMING UNIT II BY BHAVSINGH MALOTH
WEB PROGRAMMING UNIT II BY BHAVSINGH MALOTH
Bhavsingh Maloth
 
Web programming UNIT II by Bhavsingh Maloth
Web programming UNIT II by Bhavsingh MalothWeb programming UNIT II by Bhavsingh Maloth
Web programming UNIT II by Bhavsingh Maloth
Bhavsingh Maloth
 
Unit 4 Java script.pptx
Unit 4 Java script.pptxUnit 4 Java script.pptx
Unit 4 Java script.pptx
Gangesh8
 
Unit5_Web_Updvvgxsvjbffcvvgbjifszated.pptx
Unit5_Web_Updvvgxsvjbffcvvgbjifszated.pptxUnit5_Web_Updvvgxsvjbffcvvgbjifszated.pptx
Unit5_Web_Updvvgxsvjbffcvvgbjifszated.pptx
1si23bt001
 
IT2255 Web Essentials - Unit III Client-Side Processing and Scripting
IT2255 Web Essentials - Unit III Client-Side Processing and ScriptingIT2255 Web Essentials - Unit III Client-Side Processing and Scripting
IT2255 Web Essentials - Unit III Client-Side Processing and Scripting
pkaviya
 
Java Script basics and DOM
Java Script basics and DOMJava Script basics and DOM
Java Script basics and DOM
Sukrit Gupta
 
WT UNIT 2 presentation :client side technologies JavaScript And Dom
WT UNIT 2 presentation :client side technologies JavaScript And DomWT UNIT 2 presentation :client side technologies JavaScript And Dom
WT UNIT 2 presentation :client side technologies JavaScript And Dom
SrushtiGhise
 
Ad

More from Jesus Obenita Jr. (20)

Organization and management 3 a Evolution of Management Theory
Organization and management 3 a Evolution of Management TheoryOrganization and management 3 a Evolution of Management Theory
Organization and management 3 a Evolution of Management Theory
Jesus Obenita Jr.
 
Organization and management 2 Management Function
Organization and management 2 Management FunctionOrganization and management 2 Management Function
Organization and management 2 Management Function
Jesus Obenita Jr.
 
Organization and management 1
Organization and management 1Organization and management 1
Organization and management 1
Jesus Obenita Jr.
 
Designing web page marquee and img tag
Designing web page  marquee and img tagDesigning web page  marquee and img tag
Designing web page marquee and img tag
Jesus Obenita Jr.
 
Ms excel 2013 formatting worksheets
Ms excel 2013 formatting worksheetsMs excel 2013 formatting worksheets
Ms excel 2013 formatting worksheets
Jesus Obenita Jr.
 
Ms excel 2013 data management
Ms excel 2013 data managementMs excel 2013 data management
Ms excel 2013 data management
Jesus Obenita Jr.
 
Microsoft Excel introduction
Microsoft Excel introductionMicrosoft Excel introduction
Microsoft Excel introduction
Jesus Obenita Jr.
 
Word 2013 working with pictures
Word 2013 working with picturesWord 2013 working with pictures
Word 2013 working with pictures
Jesus Obenita Jr.
 
Word 2013 Formatting Page
Word 2013 Formatting PageWord 2013 Formatting Page
Word 2013 Formatting Page
Jesus Obenita Jr.
 
Word 2013 8
Word 2013 8Word 2013 8
Word 2013 8
Jesus Obenita Jr.
 
Ms word 2013 7
Ms word 2013 7Ms word 2013 7
Ms word 2013 7
Jesus Obenita Jr.
 
Ms word 2013 6
Ms word 2013 6Ms word 2013 6
Ms word 2013 6
Jesus Obenita Jr.
 
Ms word 2013 4
Ms word 2013 4Ms word 2013 4
Ms word 2013 4
Jesus Obenita Jr.
 
Ms word 2013 2
Ms word 2013 2Ms word 2013 2
Ms word 2013 2
Jesus Obenita Jr.
 
Ms word 2013
Ms word 2013Ms word 2013
Ms word 2013
Jesus Obenita Jr.
 
Parts of the ms word 2013 screen and
Parts of the ms word 2013 screen andParts of the ms word 2013 screen and
Parts of the ms word 2013 screen and
Jesus Obenita Jr.
 
Session 2 test construction.mt's
Session 2   test construction.mt'sSession 2   test construction.mt's
Session 2 test construction.mt's
Jesus Obenita Jr.
 
Cooking ingredients
Cooking ingredientsCooking ingredients
Cooking ingredients
Jesus Obenita Jr.
 
Color theory
Color theoryColor theory
Color theory
Jesus Obenita Jr.
 
Computer software
Computer softwareComputer software
Computer software
Jesus Obenita Jr.
 

Java script writing javascript

  • 2. • Discuss the syntax in writing the JavaScript in the HTML documents. • Apply the basic JavaScript command in displaying text in an HTML documents.
  • 3. • It is an object-oriented, client based scripting language created by Netscape programmer, Brendan Eich. • What can you do using JavaScript?
  • 4. JavaScript syntax <html> <html> <head><title>JS<title> <head><title>JS<title> </head> </head> <script type= “text/javascript”> <script language= “Javascript”> alert(“Welcome to the World alert(“Welcome to the World of Dynamic Programming”); of Dynamic Programming”); </script> </script> <body> <body> </body> </body> </html> </html>
  • 5. The <SCRIPT> and </SCRIPT> tags are the main way of connecting JavaScript code to HTML. You are free to embed as many scripts into a single HTML document as you like using multiple <SCRIPT> tags. Script tags What it does <script language= “JavaScript> Tells your browser that JavaScript code is about to appear alert(“Welcome….”); -Statements (object, properties, function, vari ables , methods, and events. -Semi colon terminates the statements </script> Tells the browser that the JavaScript code is all done and it can go back to HTML code
  • 6. DISPLAYING TEXT • <html> • <body> • <script type= “text/javascript”> • document.write(“Welcome to the World of Dynamic Web Programming!”) • </script> • Note: The word document.write is a standard JavaScript command for displaying text/output in a page. • The entire line document.write(“Welcome…!”) is called as statements • document is the object name and write is the property name. • Notice that a dot (.) is used to separate the object name from a property name. This is the syntax to access the property of an object
  • 7. SUMMARY Writing/Scripting in JavaScript JavaScript code is typically embedded in the HTML, to be interpreted and run by the client's browser. Here are some tips to remember when writing JavaScript commands. • JavaScript appears within the <Head> and <Body> sections of an HTML document. • JavaScript code is case sensitive • White space between words and tabs are ignored • Line breaks are ignored except within a statement • JavaScript statements end with a semi- colon (;)
  • 8. • A JavaScript code is a sequence of statements that can be embedded into an HTML page and executed directly by a Web browser to generate dynamic HTML page. • Scripting in JavaScript entails working with objects, which you can create yourself or use those built-in the language. • You can access information(properties) about the objects, perform actions(methods) on them and responds(event handler) to the events that happen to them. • Objects, properties, methods, and event handlers are the building blocks of JavaScript programs.
  • 9. CompuQuiz/Exercises/Evaluation 1. Write the JavaScript Syntax. 2. What is the script tag tells the browser that a JavaScript code is about to appear? 3. It what part or sections of the HTML documents where script tags can be written? 4. What is the basic JavaScript code or command for displaying text in you HTML documents? 5. What symbols it use to terminate a JavaScript statements?
  • 10. Assignment 1. Research on the following JavaScript commands. • Alert • Confirm 2. What is the purpose of the alert and confirm script commands in a web page?