I'm pretty new to html, I am trying to show a value on my web page that increments when a button is pressed.
Here is my code:
<script type ="text/javascript">
var likesSD = 0;
var dislikesSD= 0;
</script>
<button class="like" onclick="likes++">I like!</button>
<script>document.write(likesSD);</script>
The value on the screen does not change when the button is pushed. Is there a way I can do that without using a database?