Javascript jwysiwyg文本编辑器的计数字符?
我正在尝试为文本编辑器设置最大字符长度 我试着使用。键控功能。但它不起作用。我正在使用Javascript jwysiwyg文本编辑器的计数字符?,javascript,jquery,rich-text-editor,Javascript,Jquery,Rich Text Editor,我正在尝试为文本编辑器设置最大字符长度 我试着使用。键控功能。但它不起作用。我正在使用 dwr.util.getValue("jwysiwyg") //Its a dwr utility to get the value of an element. 获取文本编辑器的内容。 jwysiwyg是文本区域的id。它起作用了 但是如果我想用同一个id $("#jwysiwyg").keyup(this.countChars); 它不起作用 有没有其他方法可以获取文本编辑器的.keyup事件?试试看
dwr.util.getValue("jwysiwyg") //Its a dwr utility to get the value of an element.
获取文本编辑器的内容。
jwysiwyg是文本区域的id。它起作用了
但是如果我想用同一个id
$("#jwysiwyg").keyup(this.countChars);
它不起作用
有没有其他方法可以获取文本编辑器的.keyup事件?试试看
$("#jwysiwyg").keyup(function(){
return dwr.util.getValue("jwysiwyg").length; // or try ur code here this.countChars(if length doesnt work)
});
试一试