开发者

Counting Character of jwysiwyg text editor?

I am trying to set maximum character length for an jwysiwyg text editor.

I tried to use .keyup function. But its not working. I am using

dwr.util.getValue("jwysiwyg") //Its a dwr utility to get the value of an elemen开发者_Go百科t.

to get the content of the text editor. jwysiwyg is the id of text area. Its working.

But if i try to use the same id like,

$("#jwysiwyg").keyup(this.countChars);

Its not working.

Is there any other way to get the .keyup event of an text editor?


try

$("#jwysiwyg").keyup(function(){
  return dwr.util.getValue("jwysiwyg").length;  // or try ur code here this.countChars(if length doesnt work)
});
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜