answersLogoWhite

0

Primarily JavaScript is a client-side script which serves as a useful tool to

  1. Pass asynchronous data by use of AJAX (in other words you need not refresh/redirect page each and every time to get new data)
  2. Performs client-side validation (so data is processed before going to the server)
  3. It serves as an alternative to adobe technologies like flash and shockwave files as it can do image-manipulation, data transition and also animation by use of jquery
  4. JSON is a light-weight alternative to XML which can be used to transfer data between different technologies (For eg. Two modules of the same website/project can use different technologies say .NET/PHP )

These are the important use I know, others may exist which I am not aware of. You can add Javascript in two ways described below:

  • Internal Calling (Not Recommended)

  • External Calling (Recommended)