JavaScript Scripts
JavaScript is a computer language that was first created by Patrick Naughton, Bill Joy and James Gosling of Sun Microsystems. It was created with the intention of permitting a single piece of code to run on different machines, without having to rewrite it. This is a computer language that looks and feels like C++, but does not have that many features that prove to be difficult to understand and use. Java script is supported by the four main internet browsers and is very important in the internet web development world.
Â
With the help of JavaScript, it is possible to create web pages that are interactive. This is a computer language that is less powerful than the Java programming language and is also easy to learn. It can be said that JavaScript is not a programming language; it uses browsers to do its dirty work. So if you want an image to be replaced by something different, it is JavaScript that instructs the browsers to do so. Since the browsers do the work, you write the program using easy lines of codes. This is the reason why JavaScript is a very famous and easy language to learn.
Â
However, to some, JavaScript may be difficult to use. It is a full fledged programming language that helps to write complex programs in JavaScript. Most browsers tend to support JavaScript; however there is no law stating that the browser has to support the same JavaScript. So it is important that you understand the browser differences to cope with using JavaScript in them.
Â
With JavaScript, it is possible to define objects in your programs so that you can operate on them. This is possible mainly because JavaScript is an object based language; so you define a person in the program as an object using words like height, age, name, etc. JavaScript has some objects that are commonly used like document and window.
Â
Document is the web page that you view and has properties like title and bgcolor (background color). Window indicates the browser window used to view the document and its properties include status. The status is the message found in the status bar, found at the base of the window.
Â
The objects in JavaScript can do things like opening a new browser window, closing or even giving alerts through small ‘alert-box’ windows. All these actions are called methods in JavaScript. In addition to this, you can also write functions in JavaScript which are the routines that change the features of the objects of JavaScript. It is possible to write a function like ‘hello’, by changing the window’s status bar. In JavaScript, all methods and functions can be triggered using events that take place in the user’s browser.
Â
Â