Friday 16 January 2015

Javascript

Q.What is Javascript?

= Javascript is a light weight,interpreted programming language with object-oriented capabilities that allows you to build interactively into otherwise static HTML pages.
The general purpose core of the language has been embedded in Netscape,Internet Explorer and other web browsers.

Q.What are the advantages of Javascript?

=
  1. It is a light weight,interpreted programming language.
  2. Designed for creating network-centric applications.
  3. Complementary to and integrated with Java.
  4. Complementary to and integrated with HTML.
  5. Open and cross platform.

EVENT HANDLERS:

An event handler executes a segment of code based on certain events occurring within the application such as onLoad,onClick. Javascript event handlers can be divided into two parts:
  • Interactive Event Handlers.
  • Non-Interactive Event Handlers.
An interactive event handler is the one that depends on the user interactivity with the form or document.For example:
onMouseOver is an interactive event handler because it depends on the users action with the mouse. On the other hand non-interactive event handler would be onLoad because this event handler would automatically execute Javascript code without the users interactivity.

Here are all the event handlers available in Javascript.

   Event Handler            Used with
  1. onAbort                  image
  2. onBlur                    select,text,text area.
  3. onChange               select,text,text area.
  4. onClick                   button,checkbox,radio,link,reset,submit,area.
  5. onError                   image.
  6. onFocus                  select,text,text area.
  7. onLoad                   windows,image.
  8. onMouseOut          link,area.
  9. onMouseOver        link,area.
  10. onSelect                 text, text area.
  11. onSubmit               form
  12. onUnLoad             window 


  

No comments:

Post a Comment