html2js.php is a PHP script that transforms a given block of HTML into a set of DOM1 JavaScript commands (like document.createElement) that allow to recreate the HTML block dynamically in any recent browser.