<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <body> <script type="text/javascript"> <!-- function loadPreview() { content = document.getElementById("content"); preview = document.getElementById("preview"); preview.innerHTML = content.value; } function init() { content = document.getElementById("content"); content.onkeyup = loadPreview; } window.onload = init; //--> </script> </body> </html>
Co robię źle?