Monday, October 29, 2007

プレビューのサンプル

<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>

Friday, October 19, 2007

mecab 0.96 インストール

tar xvzf mecab-0.96.tar.gz
cd mecab-0.96
./configure
./make
./make install

vi /etc/ld.so.conf
/usr/local/lib を追加
ldconfig を実行

tar xvzf mecab-ipadic-2.7.0-20070801.tar.gz
cd mecab-ipadic-2.7.0-20070801
./configure --with-charset=utf8 または ./configure --enable-utf8-only
make
make install

Sunday, October 14, 2007

ペーストできない入力

<input type="text" name="mailaddress2" maxlength="256" size="100" value="" onpaste="return false;" >