We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fc3d4fc commit a60e9b2Copy full SHA for a60e9b2
js/script.js
@@ -1,7 +1,10 @@
1
function runCode(){
2
- const codeHtml = document.getElementById('for-html');
3
- const codeCss = document.getElementById('for-css');
4
- const codeJS = document.getElementById('for-js');
+ const codeHtml = document.getElementById('for-html').value;
+ const codeCss = document.getElementById('for-css').value;
+ const codeJS = document.getElementById('for-js').value;
5
const codeResult = document.getElementById('result-code');
6
+
7
+ codeResult.contentDocument.body.innerHTML = codeHtml+"<style>"+codeCss+"</style>";
8
+ codeResult.contentWindow.eval(codeJS);
9
10
}
0 commit comments