title: how can I use a users input to change the last part on an iframe link?
body: <p>I want the users input from the prompt to change the last part of the iframe's url. here is my code so far:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
    &lt;head&gt;
      &lt;style&gt;
      body{
        background-color:#ffffff
      }
      &lt;/style&gt;
    &lt;/head&gt;
    &lt;body&gt;
  &lt;!-- im attempting to make an iframe display a video the user types into 
  the prompt.--&gt;
  &lt;p id="Video"&gt;&lt;/p&gt;
  
      &lt;script&gt;
        var VideoURL = prompt("type the last part of the YouTube.com video 
  URL here");
        if(VideoURL != null){
          document.getElementById("Video").innerHTML= "you typed '' " + 
  VideoURL + " '' as your url.";
  
        } else {
          alert("please reload and type a URL.");
        }
      &lt;/script&gt;
  &lt;iframe src="www.youtube-nocookie.com/embed/(I WANT THE USERS INPUT 
  HERE)" allowfullscreen&gt;&lt;/iframe&gt;
    &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>I've been trying to do this for 3 days and still can't figure it out. please help.</p>