I'm essentially making jepoardy and trying to store a temporary variable using the inner, however when the user clicks the button, it takes them to the next page before the onclick function can be called. I've tried putting the onclick function inside the tag, but it still doesn't work.
<a href="Easy.html"><button type="button" onclick="categoryOnClick() "id="answer0" class="buttonquestion">200</button></a>
var tempscore = 0;
var currentscore = 0;
function categoryOnClick(){
tempscore = parseInt(this.innerHTML);
}