<!DOCTYPE html>
<meta charset = "utf-8" />
<script type = "text/javascript">
window.onload = function(){
var console = document.getElementById("console");
function log(text){
console.innerHTML += text + "<BR />";
}
document.getElementById("go").onmousedown = function(){
(function(){
log("оппа!");
timer = window.setTimeout(arguments.callee, 500);
}())
}
document.onmouseup = function(){
window.clearInterval(timer);
}
}
</script>
<button id = "go">go!</button>
<div id = "console"></div>