For beginners there is always a common misconception that java and JavaScript are one and the same thing. Although the names are almost the same, one can be excused for thinking that one is the short form for the other.
In reality, these two are completely different languages in both concept and design. Java is a real programming language which is powerful and much more complex - in the same category as C and C++.
On the other hand JavaScript is a scripting language that is rather an extension to HTML. It can easily be integrated with HTML by inserting small code fragments into a Web page.
Now in this web page, we are going to say goodbye to Java...perhaps we might have an interesting discussion about it next time over a cup of coffee...mmm that is if you agree to buy one. But for now...back to our discussion
Why I love JavaScript:
Oh, I almost forget...here is one of the reasons I love Java-Script, shortcuts... yes you heard me right, easy short cut menus. As you can already tell, I like to talk and write a lot.
So before I scarce you off, why don’t you use this shortcut to navigate to the most appropriate option and find out ways you can employ to spice up your web site using this wonderful codes.
Popular
JavaScript is the most popular scripting language on the internet, it’s code are embedded into HTML pages to enhance them with many interesting elements like improve the design, validate forms, detect browsers, create cookies, swap images when you move a cursor over them, to multi-level drop-down menus like the example above.
It works well in all major browsers, such as Internet Explorer, Opera, Firefox, Netscape, and Mozilla, and you can create and test all your code on your own computer.
You won’t need a server nor any special software other than a text editor and a Web browser. The only requirement is that you will need to have a basic understanding of the HTML / XHTML.
It's Benefits:
It’s a scripting language with a very simple syntax. It provides HTML designers a programming tool that almost anyone can use to put small "snippets" of code into their HTML pages.
It can put dynamic text into an HTML. It can read, write and change the content of an HTML element.
It can react to events - A Java-Script can be set to execute when something happens, like when a page has finished loading or when a user clicks on an HTML element.
It can be used to validate data before it is submitted to a server which can in deed save the server from extra processing.
It can be used to detect the visitor's browser and if need be customize the page for that specific browser.
Weakness and strength.
Its an interactive and powerful tool that can be used to trigger the occurrence or non occurrence of various events like when a page loads, when a cursor is passed over an image or link, when a button or link is clicked leading to another event or forms of interaction to occur.
Its major drawback is that different versions of the same browser handle Java-Script differently therefore essentially making it difficult to create a complicated code that work across all browsers.