日期:2014-05-16 浏览次数:20372 次
<%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%> <% String path = request.getContextPath(); String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <base href="<%=basePath%>"> <title>My JSP 'ckEditor.jsp' starting page</title> <script type="text/javascript" src="ckeditor/ckeditor.js"></script> </head> <body> This is my JSP page. <br> <textarea id="editorTest" name="editorTest" rows="" cols="">This is ckEditor test</textarea> </body> </html> <!-- 以下这段代码如果放到<head>标签中就不能运行 --> <script type="text/javascript"> CKEDITOR.replace('editorTest'); </script>