Published on

Published in: Technology
  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide


  1. 1. By Priyanka Zope
  2. 2. JavaScript is a programming language designed for Web pages. JavaScript is mainly client-side language and runs in clients software.  Javascript was created by Brendan Eich and was first introduced in December 1995.
  3. 3. Put text in an HTML page on-the-fly. Make your web pages responsive. Create cookies. Validate web form data. Detect visitors' browsers.
  4. 4.  JavaScripts can reside in a separate page. JavaScript can be embedded in HTML documents -- in the <head>, in the <body>, or in both.  JavaScript object attributes can be placed in HTML element tags. e.g., <body onLoad="alert('WELCOME')">
  5. 5. Linking can be advantageous if many pages use the same script. Use the source element to link to the script file. <script type="text/javascript" src="yourjavascript.js"></script>
  6. 6. When specifying a script only the tags <script> and </script> are essential, but complete specification is recommended: <script type="text/javascript"> </script>
  7. 7. JavaScript programming uses specialized terminology. Understanding JavaScript terms is fundamental to understanding the script. Objects, Properties, Events, Functions, Variabl es, Operators.
  8. 8. Objects refers to windows, documents, images, tables, forms, buttons or links, etc. Objects should be named. Objects have properties that act as modifiers.
  9. 9. Properties are object attributes. Object properties are defined by using the object's name, a period, and the property name. e.g., background color is expressed by: document.bgcolor . document is the object. bgcolor is the property.
  10. 10. onabort=Occurs when the user cancels loading of an image. onblur=Occurs when input focus is removed from a form element (when the user clicks outside a field) or focus is removed from a window. onclick=Occurs when the user clicks on a link or form element. onchange=Occurs when the value of a form field is changed by the user. onerror=Occurs when an error happens during loading of a document or image. onfocus=Occurs when input focus is given to a form element or a window.
  11. 11. onload=Occurs when a page is loaded into Navigator. onmouseout=Occurs when the user moves the pointer off of a link or clickable area of an image map. onmouseover=Occurs when the user moves the pointer over a hypertext. onsubmit=Occurs when a form is submitted (i.e., when the user clicks on a submit button). onunload=Occurs when the user leaves a page
  12. 12. Functions are named statements that performs tasks. e.g., function doWhatever () {statement here} The curly braces contain the statements of the function. JavaScript has built-in functions, and you can write your own.
  13. 13. Variables contain values and use the equal sign to specify their value. Variables are created by declaration using the var command with or without an initial value state. e.g. var month; e.g. var month = April;
  14. 14. Operators are used to handle variables. Types of operators with examples:  Arithmetic operators, such as plus. Comparisons operators, such as equals. Logical operators, such as and. Assignment and String operators.
  15. 15. Thank you