What is Javascript? |
Javascript is a programming language primarily used in the creation of websites. It basically adds more functionality to websites than what can be achieved using simple Html or CSS. Technically speaking it is a Scripting Language. Don’t worry it only sounds complex, it is infact one of the easiest of computer languages.
What is a scripting language? In simple words, you can understand scripting language as a light weight programming language. Compared to other full featured programming languages, a scripting language is easier to learn and simpler to execute. For beginners or intermediate users, this understanding is sufficient and besides, practically it doesn't make any meaningful difference whether you are working on a full fledged programming language or a low end scripting language.
Why do we need Javascript. Isn’t Html enough?
While basic webpages can be designed with just the use of html or CSS, javascript allows designers and developers of the site to add some dynamic functionality. What does that mean? It means that the web page is able to perform certain actions after taking decisions based on user request or interaction with the page.
For Example- A drop down menu on a page enlists all the countries of the world. Through javascript programming the webdesigner can give the webpage the intelligence to decide what to do when a certain country is selected. Lets say the user selects USA, in the next option ‘Select your state’, the webpage automatically populates it with names of the all the US states. Similarly if Australia is selected as a country, the webpage would display another set of states in the ‘select your state option’. sample
Pre-requisites of Learning Javascript?
You must know simple HTML coding to be able to learn javascript. Some of the examples in later lessons use CSS code, so some basic knowledge of CSS might also be required. No prior programming knowledge is required though. This training is designed for absolute beginners to programming world and explains the Javascript in very simple terms. Even if you have no programming experience, you will find yourself to be very comfortable with this course.
If you want to be an absolute master of javascript, our Advanced Javascript lessons will help you with that too.
Uses of Java Script.
Mouse rollover functions
Online price calculator.
Form Validation.
But there already are languages for web programming like PHP and ASP? How is javascript different?
PHP and ASP both are used for web based programming, however they are server-side scripting languages. It means that to process those languages, a web server is required. The client request is sent to the web-server which processes the language commands and sends the required info or directions back to the user’s browser like Internet Explorer, Firefox etc.
Javascript on the other hand is a Client-side scripting language. Means that it is processed by the browser on the client’s(website visitor) computer and it doesn’t need a web server to work.
When you press a submit button on a PHP page, there is a few seconds wait before the required results appear and you can see the browser busy working sign (in Internet explorer, the rotating ‘e’). This is the time for sending request to the server and receiving data. On the other hand, try this javascript based calculator .CLICK HERE . the results are there the instant you click the submit button. Besides PHP and ASP are the choice when you need to add database functionality to your websites. Javascript cannot work with databases.