Javascript Increment Function
<script> var i = 0; function buttonClick() { i++; document.getElementById('inc').value = i; } </script> <button onclick="buttonClick();">Click Me</button> <input type="text" id="inc" value="0"></input>
Website Designing Blog
<script> var i = 0; function buttonClick() { i++; document.getElementById('inc').value = i; } </script> <button onclick="buttonClick();">Click Me</button> <input type="text" id="inc" value="0"></input>