Test

textarea, iframe
{
border:2px solid #400040;
height:600px;
width:100%;
}

Paste Your Code here!

My Codes

Welcome Coders!

Write HTML, Javascript or CSS here & click run code!

Output

function runCode() {
var content = document.getElementById(‘sourceCode’).value;
var iframe = document.getElementById(‘targetCode’);
iframe = (iframe.contentWindow)?iframe.contentWindow:(iframe.contentDocument)? iframe.contentDocument.document:
iframe.contentDocument;

iframe.document.open();
iframe.document.write(content);
iframe.document.close();
return false;
}
runCode();

Advertisements