title: How to change the iframe src?
body: <p>So on my page I am using Iframe to display another webpage inside it. I want to set up an Array with many webpage (as much as I want) and I want to make 2 buttons so every time I click the Next button it will change the page inside the iframe tag that I have. My question is how can I setup the 2 buttons (Next and previous) so when I click them I will change accordingly to Array set up ?</p>
  
  <pre><code>&lt;html xmlns="w3.org/1999/xhtml"&gt;
    &lt;head&gt; 
      &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt; 
      &lt;title&gt;Untitled Document&lt;/title&gt; 
    &lt;/head&gt; 
  
    var webpageArray = new Array()
    webpageArray[0]= "web0.com/"; 
    webpageArray[1]= "web1.com/"; 
    webpageArray[2]= "web2.com/"; 
  
    &lt;iframe id="myframe" src="web1.com"&gt;&lt;/iframe&gt; 
  
    loadNextPage = function() { 
      var iframe = document.getElementById("myframe"); 
      var src = webpageArray[1]; 
      iframe.src = src; 
      return; 
    } 
    &lt;body&gt;  
      &lt;a href="" onclick="LoadNextPage"&gt; Next Web Page &gt;&gt; &lt;/a&gt; 
    &lt;/body&gt; 
    &lt;/html&gt;
  </code></pre>