一区二区久久-一区二区三区www-一区二区三区久久-一区二区三区久久精品-麻豆国产一区二区在线观看-麻豆国产视频

JSP 頁面中使用FCKeditor控件(js用法)

它可和phpJavaScript、ASPASP.NET、ColdFusion、Java、以及ABAP等不同的編程語言相結合。“FCKeditor”名稱中的“FCK” 是這個編輯器的作者的名字Frederico Caldeira Knabben的縮寫。

FCKeditor控件請到官方網站下載http://www.fckeditor.NET,本例主要用到FCKeditor_2.6.3.zip、fckeditor-Java-demo-2.4.1.zip、fckeditor-Java-2.4.1-bin.zip里面的一些內容,讀者可以自行下載。

1. 解開壓縮包FCKeditor_2.6.3.zip,將其中的fckeditor文件夾復制到WEB-INF下面,后面可以直接使用。

2. 在頁面中使用FCKeditor有兩種方式。

方式一:JavaScript的方式

(1)直接使用,見method1.html

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<script type="text/Javascript" src="fckeditor/fckeditor.js"></script>
</head>
<body>
方法一:通過JavaScript來實現的實現編輯器導入<br>
<script type="text/Javascript">
var oFCKeditor = new FCKeditor('FCKeditor1') ;
oFCKeditor.BasePath = "fckeditor/";
//oFCKeditor.BasePath   = "/FCKEditTest/fckeditor/";
oFCKeditor.Width="50%";
oFCKeditor.Height="400";
oFCKeditor.Value="initial value";
//oFCKeditor.ToolbarSet="Basic";
//默認是default
oFCKeditor.ToolbarSet="Default";
oFCKeditor.Create() ;
</script>
<hr>
</body>
</html>

(2)通過Textarea,祥見method2.html

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<script type="text/Javascript" src="fckeditor/fckeditor.js"></script>
<script type="text/Javascript">
window.onload=function(){
var oFCKeditor = new FCKeditor('MyTextarea') ;
oFCKeditor.BasePath = "fckeditor/"; //這里注意相對路徑
//oFCKeditor.BasePath   = "/FCKEditTest/fckeditor/";
oFCKeditor.ReplaceTextarea();
}
</script>
</head>
<body>
方法二:通過Textarea來實現的實現編輯器導入<br>
<textarea rows="4" cols="60" name="MyTextarea">this is a value</textarea>
</body>
</html>

方式二:在標簽使用FCKeditor

在使用標簽之前,需要搭建環境。將fckeditor-Java-2.4.1-bin.zip包中的fckeditor-Java-core-2.4.1.jar、commons-fileupload-1.2.1.jar、commons-io-1.3.2.jar、slf4j-api-1.5.2.jar以及包fckeditor-Java-demo-2.4.1.zip中的slf4j-simple-1.5.2.jar復制到lib目錄下,并構建環境。

構建完后,就可以在JSP頁面中進行使用。祥見頁面method_jsp.jsp

<%@ page language="Java" import="Java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://Java.fckeditor.NET" prefix="FCK"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>method_jsp.jsp</title>
</head>
<body>
早些版本必需將fckeditor的Value屬性必需指定對應的值,且值不能為空。
而此處版本是2.6.3,該問題已經解決。
<FCK:editor instanceName="myEditor" basePath="/fckeditor"></FCK:editor>
</body>
</html>

jsp技術JSP 頁面中使用FCKeditor控件(js用法),轉載需保留來源!

鄭重聲明:本文版權歸原作者所有,轉載文章僅為傳播更多信息之目的,如作者信息標記有誤,請第一時間聯系我們修改或刪除,多謝。

主站蜘蛛池模板: 色综合美国色农夫网 | 日本高清色惰www在线视频 | 欧美色成人| 国产欧美在线观看精品一区二区 | 黄网站观看 | 99久久99 | 好爽毛片一区二区三区四区 | 国产欧美日韩综合精品无毒 | 精品视频91 | 狠狠干视频网 | 亚洲五月婷 | 福利视频免费 | 国产乱码一区二区三区四川人 | 亚洲小视频网站 | 国产普通话一二三道 | 成人免费一区二区三区 | 深夜小视频在线观看 | www激情| 婷婷色中文字幕 | 午夜爽爽性刺激一区二区视频 | 久久涩视频 | 一级做a爰片性色毛片新版的 | 最新69国产成人精品视频69 | 日韩 国产 欧美视频一区二区三区 | 激情图片视频小说 | 亚洲一区二区影视 | 天堂网站天堂小说 | 粉嫩国产精品14xxxxx | a爱视频 | 999久久66久6只有精品 | 日本精品久久 | 久婷婷| 97午夜影院 | 精品国产自在现线看 | 免费视频91| 国产精品久久新婚兰兰 | 五月婷婷激情四射 | 成人免费福利网站在线看 | 亚洲无限乱码 | 欧美成人aaaa免费高清 | 国产精品二区三区 |