title: which radio button is checked?
body: <p>I wanted to check which radio button is checked. Then, I looked at the questions in here before i asked this question and they said that the code</p>
  
  <pre><code>        if(document.getElementById('number1').checked) 
  </code></pre>
  
  <p>is the answer. But, i got the error  "Use of undefined constant document - assumed 'document'" and  </p>
  
  <pre><code>Call to undefined function getElementById().
  </code></pre>
  
  <p>Where did it go wrong? Did i have to write the function of <code>getElementById('number1').checked</code> because it says "undefined"?
  Thanks</p>