What is JavaScript? Learn Basics of JavaScripts
icon-search
What is JavaScript? Learn Basics of JavaScripts

What is JavaScript? Learn Basics of JavaScripts


JavaScript Tutorial"
JavaScript is a Programming Language. JavaScript language is use to design for Network-Centric applications. JavaScript is very easy to implement because it is integrated to html.

<html>

   <body><script language="javascript" type="text/javascript">

 <!--

     document.write("Hello my visitor Good luck!")

       //--> </script>
</body>
</html>


JavaScript Overview"
JavaScript is High-level Programming language.It is flimsy and most commonly used as a part of web pages, and make dynamic Pages.it is interpreted programming language.
JavaScript was first known as Live-Script,But Netscape change the name of Live-Script to JavaScript.

Advantages of JavaScript"1.Feed Back to visitors,Visitor who don't have to wait of a page reload to see if user forgotten something.
2.Less Server interaction,You can validate user input before sending the page off to the server. This saves server traffic, which means less load on your server.3.Richer Interfaces,You can use also JavaScript to include such as drag-and-drop components and sliders to give a Rich Interface to your site visitors.


JavaScript Development tool"

To make our life simpler, various vendors have come up with very nice JavaScript editing tools. Some of them are listed below.1. Macromedia HomeSite, HomeSite 5 is a well-liked html and JavaScript Editor from Macromedia that can be used to manage personal websites effectively.
2. Adobe DreamweaverAdobe Dreamweaver is a very popular HTML and JavaScript editor in the professional web development crowd. It provides several handy prebuilt JavaScript components, integrates well with databases, and conforms to new standards such as XHTML and XML.3.Notepad++,Notepad++ is a simple html javaScript and many more languages like php,ASP,Cobol,Css etc.

JavaScript Syntax,


JavaScript can be implemented using JavaScript statements that are placed within the <script>... </script>.
You can place the <script> tags, containing your JavaScript, anywhere within your web page, but it is normally recommended that you should keep it within the <head> tags.
The <script> tag alerts the browser program to start interpreting all the text between these tags as a script. A simple syntax of your JavaScript will appear as follows.

<script>..write code here and close script tag by</script>
Let's make our first program in javaScript.

<html>


   <body><script language="javascript" type="text/javascript">

 <!--

     document.write("Hello my visitor Good luck!")

       //--> </script>
</body>
</html>
The following program will give result like this."Hello my visitor Good luck'.

JavaScript Variables'
JavaScript One of the most fundamental characteristics of a programming language is the set of data types it supports. These are the type of values that can be represented and manipulated in a programming language.
.Numbers 1,2,3 etc
.Strings "String taxt here"
.Boolean  "true or false"

Here is the Example"
<script type="text/javascript>
<!..
var money;
var name;
//->
</script>
Arithmetic Operator's"
1. ++(Increment)
2.--(Decrement).
3.%(Modulus).
4./(Division).
5.*(Multiplication).

6.+(Addition).
7.-(Subtraction).
For Example:

      <script type="text/javascript">
         <!--
            var a = 33;
            var b = 10;
            var c = "Test";
            var linebreak = "<br />";
         
            document.write("a + b = ");
            result = a + b;
            document.write(result);
            document.write(linebreak);
         
            document.write("a - b = ");
            result = a - b;
            document.write(result);
            document.write(linebreak);
         
            document.write("a / b = ");
            result = a / b;
            document.write(result);
            document.write(linebreak);
         
            document.write("a % b = ");
            result = a % b;
            document.write(result);
            document.write(linebreak);
         
            document.write("a + b + c = ");
            result = a + b + c;
            document.write(result);
            document.write(linebreak);
         
            a = ++a;
            document.write("++a = ");
            result = ++a;
            document.write(result);
            document.write(linebreak);
         
            b = --b;
            document.write("--b = ");
            result = --b;
            document.write(result);
            document.write(linebreak);
         //-->
      </script>
      
      Set the variables to different values and then try...
   </body>
You can place others alphabets on a,b or C.


I hope you have learn some basics of JavaScript language in next tutorial we will talk about JavaScript Objects..................



Disqus Codes

No comments

Notifications

Disqus Logo