主题: 读取网页到编辑器里,为什么在编辑器上也莫名其妙出现一次??
作者: 初入适世, 发布日期: 2013-03-13 15:15:33, 浏览数: 2217
<%@ page language="java" pageEncoding="gbk"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<html>
<head>
<title>My JSP 'editor.jsp' starting page</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
<script charset="utf-8" src="/STQAOnlineCourse/editor/kindeditor.js">
</script>
<script charset="utf-8" src="/STQAOnlineCourse/editor/lang/zh_CN.js">
</script>
<script>
var editor;
KindEditor.ready(function(K) {
editor = K.create('#editor_id');
});
</script>


</head>

<body>
<c:set var="htmlContent" scope="request"
value="${requestScope.htmlContent}" />                                  
<form name="editor" method="post" action="/STQAOnlineCourse/EditorPost.do">
<html:hidden property="file" value="${requestScope.file}" />
<textarea id="editor_id" name="htmlContent"
style="width: 700px; height: 300px;">
  ${requestScope.htmlContent}
</textarea>
<br>
<input type="submit" name="button" value="提交内容" />
(提交快捷键: Ctrl + Enter)
</form>
</body>
</html>




作者: 初入适世, 发布日期: 2013-03-13 15:32:30
 超级莫名其妙
不加这个<c:set var="htmlContent" scope="request" value="${requestScope.htmlContent}" />
就不会重复出现,不知什么原理 
回复
发表新帖 发表回复