Monday 7 November 2016

Java Script




What is Java Script ?

Java script is the most popular Client Side Scripting language at the moment that was developed by Netscape in 1995. Here  by Client Side Scripting language what we mean that all the code gets executed on the  Client's computer or user's computer.



Image result for client server architecture



This is how we use Internet everyday ,we being the client request pages from the server which in turn gives back the response desired by the client or user.

Basically there are two different types of scripting languages viz:
          Client Side Scripting language which gets executed on  client's system like Java script
          Server Side Scripting language which gets executed on Server System like PHP , ASP etc

Java Script is totally different from server side technologies because server side scripting is the way we actually connect to database and have shopping carts ,web based mail programs and so on.These two  have completely different purposes but they are often used together

The main use of Java Script is to change the appearance of web pages that is to design highly interactive web pages that cannot be achieved by Simple HTML language.
If we are using Java Script then we can have animations ,sliding images  and other interactive features.
Java Script can also be used for form Validation which is very important.
Another application of Java Script is that we can create simple applications like calculators and even Games as well.

How to include Java Script in our code?

Basically Java Script code is included between Script tag  which is then included in head section of HTML as:
<html>
<head>
<title>Tutorial on JavaScript</title>
<script type ="text/javascript">
    document.write("Welcome to Java Script");
<script>
</head>
<body>
</body>
</html>


Even we have not included any thing in Body section but when we execute this code it will show output as :
Welcome to Java Script






No comments:

Post a Comment