Q:

JavaScript button?

I want to make a button that adds on 0.00142 each time and I've created a simple JavaScript function but it doesn't seem to work?
Any help? Thanks! :)
<input type="button" value="Count" id="countButton" />

<p>You've burned <span id="displayCount">0</span> Calories!</p>

<script type="text/javascript">
  var count = +0.00142;
  var button = document.getElementById("countButton");
  var display = document.getElementById("displayCount");

  button.onclick = function(){
    count++;
    display.innerHTML = count;
  }
</script>

A:

<script type="text/javascript">
  var total = 0;
  var count = 0.00142;
  var button = document.getElementById("countButton");
  var display = document.getElementById("displayCount");

  button.onclick = function(){
    total = total + count;
    display.innerHTML = total;
  }
</script>

