Version - 1 - 1-38
This commit is contained in:
16
Version - 3/main.js
Normal file
16
Version - 3/main.js
Normal file
@@ -0,0 +1,16 @@
|
||||
var count = 0;
|
||||
window.onload = function(){
|
||||
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++;
|
||||
document.getElementById('clicks').innerHTML=count;
|
||||
}
|
||||
button.ontouchend=function(){
|
||||
red.style.visibility='visible';
|
||||
green.style.visibility='hidden'
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user