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

PPT
Java script
PPT
Java script
PPT
Java Script
PPTX
Java Script An Introduction By HWA
PPT
JavaScript Introduction
PPT
JavaScript - Part-1
PPT
JavaScript Missing Manual, Ch. 1
PPTX
Introduction To JavaScript
Java script
Java script
Java Script
Java Script An Introduction By HWA
JavaScript Introduction
JavaScript - Part-1
JavaScript Missing Manual, Ch. 1
Introduction To JavaScript

What's hot (20)

DOCX
Introduction of javascript
PPTX
Javascript
PPT
JAVA SCRIPT
PPTX
Javascript
PDF
Introduction to html & css
PPT
HTML Introduction
PPT
Javascript by geetanjali
DOCX
Javascript tutorial
PPTX
Javascripts. pptt
PPTX
Java script Session No 1
PPT
Web development basics (Part-4)
PPTX
Js syntax
PPT
PPT
Js ppt
PPT
Javascript
PDF
PPT
Javascript
PPTX
JavaScript: Implementations And Applications
PPTX
Introduction to Jquery
Introduction of javascript
Javascript
JAVA SCRIPT
Javascript
Introduction to html & css
HTML Introduction
Javascript by geetanjali
Javascript tutorial
Javascripts. pptt
Java script Session No 1
Web development basics (Part-4)
Js syntax
Js ppt
Javascript
Javascript
JavaScript: Implementations And Applications
Introduction to Jquery
Ad

Viewers also liked (8)

PPTX
Word processor
PPT
Alternative Word Processors
PPTX
Word processors in the classroom
PPTX
Word processor
PPT
The Word Processor
PDF
Data and Information Visualization: the Principles of Infographics - English ...
PPTX
Word processors in the classroom
PPTX
Word processor in the classroom
Word processor
Alternative Word Processors
Word processors in the classroom
Word processor
The Word Processor
Data and Information Visualization: the Principles of Infographics - English ...
Word processors in the classroom
Word processor in the classroom
Ad

Similar to Java script writing javascript (20)

DOC
Java script by Act Academy
DOC
2javascript web programming with JAVA script
PPTX
BEAAUTIFUL presentation of java
PDF
JS BASICS JAVA SCRIPT SCRIPTING
PPT
Java script
PPTX
HNDIT1022 Week 08, 09 10 Theory web .pptx
PDF
CS8651- Unit 2 - JS.internet programming paper anna university -2017 regulation
DOC
Basics java scripts
PDF
java-scriptcdvcx vnbm,azsdfghjkml;sxdfcgmndxfcgvhb nmfctgvbhjnm ,cfgvb nm,xc ...
PPTX
JavaScript - Getting Started.pptx
PDF
Basic JavaScript Tutorial
PPT
Java script Learn Easy
DOC
Introduction to java script
PDF
Wt unit 2 ppts client side technology
PDF
Wt unit 2 ppts client sied technology
PPT
Session vii(java scriptbasics)
PDF
Intro to Javascript and jQuery
PPT
Java script202
PPTX
Final Java-script.pptx
Java script by Act Academy
2javascript web programming with JAVA script
BEAAUTIFUL presentation of java
JS BASICS JAVA SCRIPT SCRIPTING
Java script
HNDIT1022 Week 08, 09 10 Theory web .pptx
CS8651- Unit 2 - JS.internet programming paper anna university -2017 regulation
Basics java scripts
java-scriptcdvcx vnbm,azsdfghjkml;sxdfcgmndxfcgvhb nmfctgvbhjnm ,cfgvb nm,xc ...
JavaScript - Getting Started.pptx
Basic JavaScript Tutorial
Java script Learn Easy
Introduction to java script
Wt unit 2 ppts client side technology
Wt unit 2 ppts client sied technology
Session vii(java scriptbasics)
Intro to Javascript and jQuery
Java script202
Final Java-script.pptx

More from Jesus Obenita Jr. (20)

PPTX
Organization and management 3 a Evolution of Management Theory
PPTX
Organization and management 2 Management Function
PPTX
Organization and management 1
PPTX
Designing web page marquee and img tag
PPTX
Ms excel 2013 formatting worksheets
PPTX
Ms excel 2013 data management
PPTX
Microsoft Excel introduction
PPTX
Word 2013 working with pictures
PPTX
Word 2013 Formatting Page
PPTX
Word 2013 8
PPTX
Ms word 2013 7
PPTX
Ms word 2013 6
PPTX
Ms word 2013 4
PPTX
Ms word 2013 2
PPTX
Ms word 2013
PPTX
Parts of the ms word 2013 screen and
PPT
Session 2 test construction.mt's
PPTX
Cooking ingredients
PPTX
Color theory
PPTX
Computer software
Organization and management 3 a Evolution of Management Theory
Organization and management 2 Management Function
Organization and management 1
Designing web page marquee and img tag
Ms excel 2013 formatting worksheets
Ms excel 2013 data management
Microsoft Excel introduction
Word 2013 working with pictures
Word 2013 Formatting Page
Word 2013 8
Ms word 2013 7
Ms word 2013 6
Ms word 2013 4
Ms word 2013 2
Ms word 2013
Parts of the ms word 2013 screen and
Session 2 test construction.mt's
Cooking ingredients
Color theory
Computer software

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?