Version - 1 - 1-38

This commit is contained in:
2023-11-29 22:29:18 +01:00
commit 2b81a65227
396 changed files with 19689 additions and 0 deletions

24
Version - 6/main.js Normal file
View File

@@ -0,0 +1,24 @@
var count = 0;
window.onload = function(){
count = localStorage.getItem('count');
document.getElementById('clicks').innerHTML=count;
var red = document.getElementById('red');
var green = document.getElementById('green');
var button = document.getElementById('button1');
button.ontouchstart = function(){
red.style.visibility='hidden';
green.style.visibility='visible'
count++;
localStorage.setItem('count',count);
document.getElementById('clicks').innerHTML=count;
}
button.ontouchend=function(){
red.style.visibility='visible';
green.style.visibility='hidden'
}
}
function reset(){
localStorage.removeItem('count');
count=0;
document.getElementById('clicks').innerHTML=count;
}