title: In JavaScript, how do I make it so hovering over the label will output in a p tag the value of the radio button?
body: <p>Say I have a list with radio buttons in it. How do I make it such that hovering over the label will write the value of the radio button into HTML into a <code>&lt;p&gt;</code> tag?</p>
  
  <p>So say it was:</p>
  
  <p><code>o Option One</code></p>
  
  <p>Hovering over Option One would write the value of the radio button into a <code>&lt;p&gt;</code> tag below.</p>
  
  <p>My code is below and it won't work. It should update obviously if the user clicks a different radio button.</p>
  
  <pre><code>function showDegree() {
      var degreeOptions = document.getElementsByName('degree');
      var degreeChoice;
      var i;
  
      for (i = 0; i &lt; degreeOptions.length; i++) {
          if (degreeOptions[i].checked) {
              degreeChoice = degreeOptions[i].value;
          }
      }
  
      document.getElementById('degreeOutput').innerHTML = degreeChoice;
  }
  </code></pre>