Hi I´m new with javascript and I´m trying to learn everything I can and I came yesterday to this problem. I was trying to programe my own calculation, but this problem occured:
with this input, the script is working well:
<input type="button" value = "1" onClick = "pridajZnak(kalkulacka, jedna)">
but with this, it´s kind of broken:
<button name="jedna" onClick="pridajZnak(kalkulacka, jedna)">1</button>
The problem is that function pridajZnak is adding one char to the actual value of different element, input working well, but button is doing funny things, after button pressed it will just blick with added char and then come back to previous state...
Can someone tell me where´s the problem? I just want to undestand the difference...thanks