I have the following structure.
Hello World !!
If you want to set an html content containg script tag to iframe, you have access to the iframe you created with:
$(iframeElement).contentWindow.document
so you can set innerHTML of any element in this.
But, for script tag, you should create and append an script tag, like this:
https://stackoverflow.com/a/13122011/4718434