You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
472 B
20 lines
472 B
7 months ago
|
function update() {
|
||
|
|
||
|
var html = document.getElementById("html");
|
||
|
var css = document.getElementById("css");
|
||
|
var code = document.getElementById("code").contentWindow.document;
|
||
|
|
||
|
document.body.onkeyup = function(){
|
||
|
code.open();
|
||
|
code.writeln(html.value+"<style>"+css.value+"</style>");
|
||
|
code.close();
|
||
|
};
|
||
|
document.addEventListener("DOMContentLoaded", function(){
|
||
|
code.open();
|
||
|
code.writeln(html.value+"<style>"+css.value+"</style>");
|
||
|
code.close();
|
||
|
});
|
||
|
};
|
||
|
|
||
|
update();
|