0
Hello, I’m a beginner in javascript and I would like to know how to block the item, when var total reaches the same value as the item, ex: 200, increase 2 by 2 not 1 by 1.
var total = 1;
function clickAumento () {
document.getElementById('marioClick').value = total++;
}
<div id="divContador">
<input type="text" id="marioClick" value="0"></input>
</div>
<div id="divMario">
<img onclick="clickAumento()" id="mario" src="http://www.imagenspng.com.br/wp-content/uploads/2015/02/super-mario-mario-11.png">
</div>
tried to use
total+2
?– Wees Smith
John your question is confused, not to understand. It says: how do I lock the item when unlock on click, could edit and better clarify your problem or difficulty ?
– NoobSaibot
What do you mean, "block"?
– Sam
I edited!! basically fundamentals of a Clicker game
– João Marçura
block the click?
– Sam