Use sublime to ensure you don't do such mistakes. It's mistake of " and ' :
either way it will work:
<script>
document.write('<iframe width="560" height="315" src="https://www.youtube.com/embed/9Ow8QgoXzeE" frameborder="0" allowfullscreen></iframe>');
</script>
or
<script>
document.write("<iframe width='560' height='315' src='https://www.youtube.com/embed/9Ow8QgoXzeE' frameborder='0' allowfullscreen></iframe>");
</script>
In your code, reason why it doesn't work is that you are using all way : " and that is why it will not be recognizable where your string ends and starts.
For more clarification, see this:
var ex = "its "important" to know";//wrong
var ex = "its 'important' to know";//right
var ex = 'its "important" to know';//right
You can see that first statement gets processed as one string: "its " and other string "to know" but not characters between(important).