Javascript 101
With the growing complexity of the World Wide Web, the use of simple HTML may become inadequate in the design of better and more appropriate websites. HTML is simply a rendering tool that describes how text and graphics should appear in a Web browser.
The use of HTML in web pages allows for limited user interaction. HTML has no inherent intelligence and therefore cannot perform certain processes behind the scenes. Because of the limitation observed from the use of HTML that JavaScript was developed.
JavaScript allows web designers to go beyond simple rendering of text and images and provide some bit of dynamism in otherwise static documents. By using JavaScript along with HTML, people may be able to create web pages that can perform certain calculations, display alerts, design pages that respond to user inputs and many more. Although JavaScript is not a general purpose programming language, it can help provide additional functionality that solely using HTML lacks.
A good example of using JavaScript in web pages is the validation of certain web input values to make sure that they fall within certain parameters before they are to be submitted to the server. JavaScript can also be used in opening up a new window that can be controlled in size, position, and look. JavaScript can also be used to change images as the mouse moves over them to attract a user's attention to important links that is shown as graphical elements.
Through the use of JavaScript, important processes can be done such as input validation and user interaction right within the browser without involving the server. This prevents additional load on the server performance and less network traffic. It also allows a faster turnaround of input requests and validation since some inquiries no longer have to be directed to the server first before being validated.
JavaScript is fairly easy to learn. But it should not be considered as a lightweight version of the Java programming language. Java Script is a powerful language in its own right. They have certain differences between them. One of those differences is that JavaScript may be slower inherently than Java.
Another difference is that JavaScript's source code may also be less secure than that of Java. Anyone may be able to view and modify the JavaScript code using an ordinary text editor. For this reason, JavaScript is mainly used within web pages while Java can be used to create applets that can run within the browser independent of the created web page.
