Welcome learners, You are going to find a basic introduction to Javascript here. If you didn’t refer to my previous posts of HTML and CSS do refer if needed.
Introduction to Javascript
You know that you can create static webpages using HTML. Static webpage is essentially just a different way of presenting information that could equally easily have been published in a book.
You can make your static webpages as dynamic using Javascript. You can make your webpage much interactive. Interactive web sites becomes much more like an application that a book, which changes your whole web experience.
Javascript
Javascript originates from a language called LiveScript. The main idea was to find a language which you could use to provide client-side in browser applications. But which was not as much complicated as java. If you have good programming skills in java, you can easily learn and understand Javascript. Because of your knowledge in java, learning Javascript is relatively simpler to you. But having good knowledge in Javascript will not help you to learn java.
Javascript is a simple language which is suitable for simple tasks. You can use this language to tasks which run for short time. Javascript is used to manipulate the pieces of the DOM which is document object model.
You can run your Javascript code anywhere, because it is platform independent in nature. If you doesn’t have programming knowledge so far, you feel it as a bit complicated at the beginning. But very quickly you will feel comfortable and adoptable to the language.
Advantages of using Javascript
If you want to make your webpage dynamic, Javascript provides you with a no. of benefits.
- Javascript is widely supported in Web browsers
- It gives easy access to document objects
- You can also manipulate document objects using Javascript.
- web surfers don’t need Special plug-ins in order to use Javascript
- Javascript is secure
- Javascript cannot read from your hard drive nor write it.
- You can’t get a virus infection directly from Javascript.
Drawbacks
- If your Javascript doesn’t work then your page is useless.
- Because of the problems of broken scripts many Web surfers disable Javascript support in their browsers.
- Script can run slowly and complex scripts can take a long time to start up
- Most scripts rely upon manipulating the elements of DOM.
- Support for standard set of objects currently doesn’t exist and access to objects differ from browsers to browsers.
this a link to write a small program that pops up an alert message when you load the page. Or better yet, change the content of your page to the current Date every time you open the page.