This is javascript. There are 2 levels here. Some things need the server and some don't. Start by trying things without the server. A practical example:
http://www.luan.ws/fschmidt/stopwatch.htmlThis is a pure HTML file. You can view source or download it. Note that I use the "onclick" attribute. Modern programmers hate this (because it is readable) and never use it, but I always use it. I think it would be worthwhile for you to study my stopwatch example to help learn javascript.