Simple Timer in javascript

This tutorial shows you a simple count down timer in javascript, which you can modify according to your need.. This is in javascript, hence it is not as powerful as it should be, like if a user refreshes its browser, the value is not stored anywhere, and the countdown timer

Hide/show div,elements with javascript

In this tutorial i am going to explain how can we hide or unhide elements on a webpage using simple javascript function. Let me tell you this function is very basic and can be extended according to your requirement. There are certain readymade libraries/frameworks available like jquery,prototype. These make it

Adding a class to an element using javascript

There are times when you need to add/change a class for a particular element. This can be very easily achieve using the className method. Please refer to the following snippet of code to understand how it works. Explanation is given after the code. <script type="text/javascript"> function addClass(obj) { obj.className="highlight"; }