I am trying to create a function that will go from one question page to the next via a button. So there is a button that links to the next question and in the url it should go to 2 from 1 and so on.

I created a function but it only goes to /1 or /11. Any help would be appreciated.

```html
<button onclick="incPage();">Next Question</button>
<script>
  var i = 1;
  var url = "http://127.0.0.1:8000/SAT/" + i;

  function incPage() {
    if (i < 1000) {
      i++;
      window.location = url;
    } else if (i = 10) {
      i = 0;
    }
    document.getElementById("display").innerHTML = i;
  }

  function decPage() {
    if (i > 0) {
      --i;
      window.location = url;
    } else if (i = 0) {
      i = 10;
    }
    document.getElementById("display").innerHTML = i;
  }
</script>

```