Q:

Simple click counter using JavaScript

I am creating a simple little test game and my idea is a number '0' displays on the screen. When you click the number, it adds 1. I want the number counter to be infinite, so you can just keep clicking it, and it adds 1.
I also need a way of resetting the number. Maybe a button next to it or under it saying 'reset'.
I don't have any code, but I would think this would be simple. I know some JavaScript and most HTML/ CSS so if it could maybe be done in JavaScript then that would be very cool.
Thanks in advance! Bye :)

A:

http://jsfiddle.net/Hk4xJ/1/
HTML
<div id="counter">o</div>
<button id="reset">reset</button>

javascript
var count=0

document.getElementById("counter").onclick=function(){
    count=count+1;
    this.innerHTML=count}

document.getElementById("reset").onclick=function(){
    count=0
    document.getElementById("counter").innerHTML=count;
}

