键盘事件绑定:
<html> <head> <base href="<%=basePath%>"> <title>Insert title here</title> <script type="text/javascript" src="<%=basePath %>ckk/ckeditor/ckeditor.js"></script> </head> <body> <form action="" method="post"> <textarea class="ckeditor" name="context" id="context"></textarea> <input type="button" value="提交" onclick="test()"/> </form> <div id="info"></div> ${param.context } <script type="text/javascript"> //键盘事件绑定 var editor = CKEDITOR.replace('context'); CKEDITOR.instances["context"].on("key", function(evt){ document.getElementById("info").innerHTML =editor.getData(); }); </script> </body> </html>