Javascript

Written by Larry Gray on . Posted in About Javascript, Javascript

Javascript was in the beginning called Live Script. Its name was changed to Javascript or Microsoft JScript as a marketing ploy. Javascript is based on the EMCA script standard and specifications. Basically Microsoft and Netscape invented Javascript. Javascript is similar in syntax to C or Java. Many Java concepts and standards are also part of Javascript. However Javascript is not Java.

Inline Javascript example.

<html>
    <head>
        <title>JavaScript Hello World</title>
        <script>
            alert('Hello, World!);
        </script>
    </head>
    <body>
         Main body text goes here.
    </body>
</html>
Now some years back there was this concept of DHTML. DHTML was merely a combination of HTML, CSS, and Javascript along with the HTML DOM. HTML DOM is where the browsers begin to keep or store the HTML in a DOM, a DOM is a document object model. Javascript has access to this DOM. This makes it very easy for Javascript to change the currently displayed web page on the fly based on programming logic. While Javascript is by no means a substitution for Java, I feel that it is a very good complimentary tech to go with Java web development. This is why I have decided to use Javascript and support it on my web site and not because it has the Java TM name in its Name.

JQuery example.

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
    $("#hide").click(function(){
        $("p").hide();
    });
    $("#show").click(function(){
        $("p").show();
    });
});
</script>
Javascript can be run on the server side, using 'node.js', as well as on the client side(in the browser). Well known Javascript concepts are Ajax (short for Asynchronous Javascript and XML) and JQuery. I explain Ajax in an article about Ajax. JQuery is a 3rd party API that simplifies Javascript coding with HTML DOM navigation. Interesting things can be accomplished efficiently with Server Side Javascript, Ajax, JQuery and databases. Latest versions of Javascript however will obsolete JQuery with JQuery type API built in.  

Tags: , , , , , ,

Trackback from your site.

Leave a comment