Hi, I am trying to make a click counter.
The prolem is the onClick part in button code.
If i made it so it was "click();" and placed the var clicks into the function click then it would kind of work.
But when I pass a variable into it.. it won't.
Thanks.
<html>
<head>
<h1 align = center>Javascript Dump</h1>
</head>
<script type ="text/javascript">
var clicks = 0;
function click(clicks){
x += 1;
document.getElementById("counter").value = x;
}
</script>
//button code
<input type = "button", value = "0", onClick = "click(clicks);", id = "counter">
</html>