<HTML>
<HEAD><TITLE>プレビュー</TITLE>
<script type="text/javascript" src="/prototype.js"></script>
<SCRIPT LANGUAGE="JavaScript">
<!--
function Preview()
{
// IE ONLY
// canvas.innerHTML =document.getElementById("body").value;
// prototype
var body = document.form.body.value.replace(/\x0D\x0A|\x0D|\x0A/g,'<br>')
$('canvas').innerHTML = body ;
}
//-->
</SCRIPT>
</HEAD>
<BODY>
<form name="form">
<textarea name="body" rows="10" onmouseup="Preview();" onkeydown="Preview();" onkeyup="Preview();" style="width:570px"></textarea>
</form>
<div id="canvas"></div>
</BODY>
</HTML>
No comments:
Post a Comment