title: Clicking an Input Button more than once in HTML5
body: <p>I'm building out a dice game using HTML5 and JavaScript.  </p>
  
  <p>I want a player to be able to select a dice with an onlclick. This will stop the dice from being rolled.  The player should be able to onclick the dice button again which will allow the dice to be rolled again.  </p>
  
  <p>I have played with the code and the first onclick works but the second onclick does not.   </p>
  
  <p>Is this a limitation of one onclick per input button or should I use another HTML tag other than input button?</p>
  
  <p>I want the game to be played without reloading the screen. </p>
  
  <h2>HTML5</h2>
  
  <pre><code>&lt;tr&gt;
  &lt;th&gt;&lt;input type="button" id="diceOne" onclick="selectDice(this.id,this.value)" value="0"&gt;&lt;/input&gt;&lt;/th&gt;
  
  &lt;th&gt;&lt;input type="button" id="diceTwo" onclick="selectDice(this.id,this.value)" value="1"&gt;&lt;/input&gt;&lt;/th&gt;
  
  &lt;th&gt;&lt;input type="button" id="diceThree" onclick="selectDice(this.id,this.value)" value="2"&gt;&lt;/input&gt;&lt;/th&gt;
  
  &lt;th&gt;&lt;input type="button" id="diceFour" onclick="selectDice(this.id,this.value)" value="3"&gt;&lt;/input&gt;&lt;/th&gt;
  
  &lt;th&gt;&lt;input type="button" id="diceFive" onclick="selectDice(this.id,this.value)" value="4"&gt;&lt;/input&gt;&lt;/th&gt;
  &lt;/tr&gt;
  </code></pre>
  
  <h2>Javascript</h2>
  
  <pre><code>function selectDice(diceName,diceValue){
  if (diceArray[diceValue][1]=="y"){
      alert(diceArray[diceValue][1]);
      document.getElementById(diceName).value = "Die now selected";
      diceArray[diceValue][1]="n";
      alert(diceArray[diceValue][1]); 
  } 
  else {
      alert(diceArray[diceValue][1]); 
      document.getElementById(diceName).value = "Die not selected";
      diceArray[diceValue][1]="y";
      alert(diceArray[diceValue][1]); 
  }
  
  }
  </code></pre>