SlideShare a Scribd company logo
Javascript * JavaScript is the most popular scripting language on the internet, and  works in all major browsers, such as Internet Explorer, Firefox,  Chrome, Opera, and Safari. * JavaScript was designed to add interactivity to HTML pages * A scripting language is a lightweight programming language * JavaScript is usually embedded directly into HTML pages * JavaScript is an interpreted language (means that scripts execute  without preliminary compilation)
Uses *  JavaScript gives HTML designers a programming tool.  * JavaScript can put dynamic text into an HTML page.  * JavaScript can react to events.  * JavaScript can read and write HTML elements.  * JavaScript can be used to validate data.  * JavaScript can be used to detect the visitor's browser.  * JavaScript can be used to create cookies.
Javascript Statements * Javascript is a sequence of statements to be executed by the browser. * A JavaScript statement is a command to a browser. The purpose of the  command is to tell the browser what to do. * This JavaScript statement tells the browser to write "Hello Dolly" to the  web page: document.write("Hello Dolly");
HTML tags in javascript The example below shows how to add HTML tags to the JavaScript: <html> <body> <script type=&quot;text/javascript&quot;> document.write(&quot;<h1>Hello World!</h1>&quot;); </script> </body> </html>  The  document.write  command is a standard JavaScript command for writing output to a page.
Javascript Comments Comments can be added to explain the JavaScript, or to make the code more readable. Example for comments: <script type=&quot;text/javascript&quot;> // Write a heading document.write(&quot;<h1>This is a heading</h1>&quot;); // Write two paragraphs: document.write(&quot;<p>This is a paragraph.</p>&quot;); document.write(&quot;<p>This is another paragraph.</p>&quot;); </script>
Advantages * Advantages include Cross-browser support, validating data on the  client, and being able to create more sophisticated user interfaces. * JavaScript is an excellent solution to implement when validating input  forms on the client side. * This means that if a user forgets to enter his name in a form for  instance a JavaScript validation function can popup a message to let  him know about the omission. * JavaScript effects are also much faster to download than some other  front-end technologies like Flash and Java applets.

More Related Content

PPT
Java Script
PPT
HTML Introduction
PPT
JavaScript - Part-1
PPTX
Xml and JavaScript
PPT
JWU Guest Talk: JavaScript and AJAX
PPT
JavaScript Introduction
PPTX
Java Script
PPT
Javascript
Java Script
HTML Introduction
JavaScript - Part-1
Xml and JavaScript
JWU Guest Talk: JavaScript and AJAX
JavaScript Introduction
Java Script
Javascript

What's hot (18)

PPT
Agile Development With Hobo
PPTX
JSP custom tags
PPT
Java script
PPT
1.1 xhtml basics
PPT
Introduction to javaScript
PPTX
Html guide
PPTX
Introduction to HAML
PPTX
Java script writing javascript
PPTX
Basic HTML
PPT
Javascript
PPTX
Different examples of jsp codes
PPT
Java script
DOC
Basics java scripts
RTF
Java scripts
ODP
PHP Basics for Designers
PPT
Privilege Escalation And Misconfigurations Part2
PPTX
A Web Developer's Journey across different versions of ASP.NET
PDF
Front-End Tooling
Agile Development With Hobo
JSP custom tags
Java script
1.1 xhtml basics
Introduction to javaScript
Html guide
Introduction to HAML
Java script writing javascript
Basic HTML
Javascript
Different examples of jsp codes
Java script
Basics java scripts
Java scripts
PHP Basics for Designers
Privilege Escalation And Misconfigurations Part2
A Web Developer's Journey across different versions of ASP.NET
Front-End Tooling
Ad

Viewers also liked (6)

PPT
PPTX
Predicting churn in telco industry: machine learning approach - Marko Mitić
Predicting churn in telco industry: machine learning approach - Marko Mitić
Ad

Similar to Javascript (20)

PDF
WEB PROGRAMMING UNIT II BY BHAVSINGH MALOTH
PDF
Web programming UNIT II by Bhavsingh Maloth
DOCX
Javascript
PDF
Basic JavaScript Tutorial
PDF
Java script how to
PDF
JS BASICS JAVA SCRIPT SCRIPTING
PPT
JS-Slides-1hgvhfhgftgfvujguyghvhjbjbnnhg
PPT
java script programming slide 1 from tn state
PPT
basics of javascript and fundamentals ppt
PPT
Javascript overview and introduction to js
PPT
JS-Slides-1 (1).ppt vbefgvsdfgdfgfggergertgrtgrtgt
PPT
JS-Slides_for_begineers_javascript-1.ppt
PPT
JAVA SCRIPT
PPT
Session vii(java scriptbasics)
DOCX
Javascript tutorial
PDF
CS8651- Unit 2 - JS.internet programming paper anna university -2017 regulation
PPT
Java script
DOC
Java script by Act Academy
PPTX
Javascript 01 (js)
PDF
8.-Javascript-report powerpoint presentation
WEB PROGRAMMING UNIT II BY BHAVSINGH MALOTH
Web programming UNIT II by Bhavsingh Maloth
Javascript
Basic JavaScript Tutorial
Java script how to
JS BASICS JAVA SCRIPT SCRIPTING
JS-Slides-1hgvhfhgftgfvujguyghvhjbjbnnhg
java script programming slide 1 from tn state
basics of javascript and fundamentals ppt
Javascript overview and introduction to js
JS-Slides-1 (1).ppt vbefgvsdfgdfgfggergertgrtgrtgt
JS-Slides_for_begineers_javascript-1.ppt
JAVA SCRIPT
Session vii(java scriptbasics)
Javascript tutorial
CS8651- Unit 2 - JS.internet programming paper anna university -2017 regulation
Java script
Java script by Act Academy
Javascript 01 (js)
8.-Javascript-report powerpoint presentation

Javascript

  • 1. Javascript * JavaScript is the most popular scripting language on the internet, and works in all major browsers, such as Internet Explorer, Firefox, Chrome, Opera, and Safari. * JavaScript was designed to add interactivity to HTML pages * A scripting language is a lightweight programming language * JavaScript is usually embedded directly into HTML pages * JavaScript is an interpreted language (means that scripts execute without preliminary compilation)
  • 2. Uses * JavaScript gives HTML designers a programming tool. * JavaScript can put dynamic text into an HTML page. * JavaScript can react to events. * JavaScript can read and write HTML elements. * JavaScript can be used to validate data. * JavaScript can be used to detect the visitor's browser. * JavaScript can be used to create cookies.
  • 3. Javascript Statements * Javascript is a sequence of statements to be executed by the browser. * A JavaScript statement is a command to a browser. The purpose of the command is to tell the browser what to do. * This JavaScript statement tells the browser to write &quot;Hello Dolly&quot; to the web page: document.write(&quot;Hello Dolly&quot;);
  • 4. HTML tags in javascript The example below shows how to add HTML tags to the JavaScript: <html> <body> <script type=&quot;text/javascript&quot;> document.write(&quot;<h1>Hello World!</h1>&quot;); </script> </body> </html> The document.write command is a standard JavaScript command for writing output to a page.
  • 5. Javascript Comments Comments can be added to explain the JavaScript, or to make the code more readable. Example for comments: <script type=&quot;text/javascript&quot;> // Write a heading document.write(&quot;<h1>This is a heading</h1>&quot;); // Write two paragraphs: document.write(&quot;<p>This is a paragraph.</p>&quot;); document.write(&quot;<p>This is another paragraph.</p>&quot;); </script>
  • 6. Advantages * Advantages include Cross-browser support, validating data on the client, and being able to create more sophisticated user interfaces. * JavaScript is an excellent solution to implement when validating input forms on the client side. * This means that if a user forgets to enter his name in a form for instance a JavaScript validation function can popup a message to let him know about the omission. * JavaScript effects are also much faster to download than some other front-end technologies like Flash and Java applets.