You are referring to Javascript, not Java. Javascript is incorporated into webpages and doesn't need to be installed. Java does need to install and is used for making applets. Two different things.
As for id="timer", you can set it's value using something like this.
javascript:document.getElementById("timer").innerHTML="Enter new value here";
But be aware that if it is counting down, there is probably a setInterval or setTimeout somewhere in the Javascript code of that page triggering it, and so the above bookmarklet will do nothing and can't do anything based on the information you've provided. One thing you could try is stopping all setTimeouts or setIntervals on the page, THEN calling the code above, but they may break something else in the page.
javascript:window.setTimeout = function(func, delay) {};window.setInterval = function(func, delay) {};document.getElementById("timer").innerHTML="Enter new value here";
To make them bookmarklets, just set those to the href attribute of a link, or type them in as URL of a bookmark.