title: Running Score / Quiz game
body: <p>I am a beginner coder, and I am working on this quiz-type program. It needs to ask pre-created questions, and then check if you got the right answer, adjust your running score, and then show the next problem. I finished everything else, but the part that is getting me stuck is this part. </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;!doctype html&gt;
      
      &lt;html lang="en"&gt;
      &lt;head&gt;
          &lt;title&gt;Group Project&lt;/title&gt;
      &lt;/head&gt;
      &lt;body&gt;
          &lt;script text="text/javascript"&gt;
              var a = 0;
              var b = 0;
              document.write(a, "/", b)  
              function score() {
                  
              
              var a = 0;
              var b = 0;
                
              if (document.question.one.value=="10") {
                  ++a;
                  ++b;
                 
              }
              else{
                  ++b;
                  
              }
              document.write(a, "/", b)
              }
          &lt;/script&gt;
          
          
          &lt;form name="question"&gt;&lt;br&gt;
              &lt;input type="text" name="one"/&gt;&lt;br&gt;
              &lt;input type="button" value="Submit" onclick="score()" /&gt;
              
              
          &lt;/form&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>I picked 10 in the IF statement just to see is the increment works, but what happens when I do input 10 into the text input, the page reloads, showing only the created fraction and no buttons or text inputs. How can I make it so the score or fraction runs along, and does not need a complete page reload to increment?</p>