Takeshi Amano
p****@takes*****
2008年 9月 12日 (金) 15:21:39 JST
天野です こないだこれ使いました。 http://www.swartzfager.org/blog/jQuery/plugins/textCounting/ 例の様にtextareaに属性を付けるのはなんだかうまく行かなかったので このライブラリの中の関数を以下の様に直接呼んでいます。keyupイベントに くっつけるといいと思うので: $(function(){ $('#content').keyup(function(){ $('#content_count').html($.fn.textCounting.calculateCount($('#content'), 'characters' ,'up')); }); }); 見たいな感じでいけると思います。このコードはテストしてないので、 動かなくても怒らないでくださいね(笑 Takeshi Amano Ads are the cave art of the twentieth century - Marshall McLuhan