FCKEditor的用法(asp版)
1:下载FCKEditor
去www.baidu.com 搜索,我本来想上传的,但不知道怎么传。下载下来后解压到你网站的目录,最好就放在根目录下,文件夹名字就用FCKEditor;这里可以随便自己喜好,但我的例子里就是这样。
2:在页面里引用
首先引用FCKEditor:在你的页面里加入<!-- #include file="FCKeditor/fckeditor.asp" -->
然后在你页面中想要它显示的地方加入以下代码
<%
Dim oFCKeditor
Set oFCKeditor = New FCKeditor
oFCKeditor.BasePath = "FCKeditor/"
oFCKeditor.ToolbarSet = "Default"
oFCKeditor.Width = "98%"
oFCKeditor.Height = "500px"
oFCKeditor.Value = ""
oFCKeditor.Create "logbody"
%> 这段的作用就是初始加载FCKeditor编辑器。这段网上都有注解,可以去搜索。
到此,你就已经添加成功,你的页面中就已经出现编辑器了。
如何把FCKeditor的内容保存到数据库,如何把数据库里的数据显示在FCKeditor中,我想这是多数初用者最想知道的。请看上面引用代码中的这一句:oFCKeditor.Create "logbody" 这里的logbody就代表你的FCKeditor,你也可以用其它的名字。
怎么使用呢,我是这样做的:用一个表单把它装起来,然后就和文本框一样使用了,如:
<form action="saveBhou.asp" method="post">
<%
Dim oFCKeditor
Set oFCKeditor = New FCKeditor
oFCKeditor.BasePath = "FCKeditor/"
oFCKeditor.ToolbarSet = "Default"
oFCKeditor.Width = "98%"
oFCKeditor.Height = "500px"
oFCKeditor.Value = ""
oFCKeditor.Create "logbody"
%>
</form
然后在saveBhou.asp里读取:text=request("logbody"),这里的text就是你要的内容,把他把存到数据库中就OK。
把数据库里的内容显示在FCKeditor中就在引用代码中给这句赋值oFCKeditor.Value = ""
FCKEditor的用法(asp版)的更多相关文章
- FCKEditor的用法与下载
以下是我初次使用FCKEditor的方法,都是来自网上,但网上都不完整,现在我整理下: 1:下载FCKEditor 下载下来后解压到你网站的目录,最好就放在根目录下,文件夹名字就用FCKEditor: ...
- 大学站防SQL注入代码(ASP版)
方法1: Replace过滤字符 解决方法:查找login.asp下的<from找到下边的类似username=request.Form(”name”) pass=request.Form(”p ...
- 防SQL注入代码(ASP版)
<% Dim Fy_Url,Fy_a,Fy_x,Fy_Cs(),Fy_Cl,Fy_Ts,Fy_Zx '---定义部份 头------ Fy_Cl = 1 '处理方式:1=提示信息,2=转向页面, ...
- fckeditor的用法
1.下载解压文件 2.将解压后的文件放入webroot下 3.将js引入要使用fckeditor的页面 4.用ckeditor替换textarea <@e.textarea id="t ...
- redirect的错误用法asp.net怎么使用自定义错误
工作了几年,写过程序也运营过网站,自定义错误也很熟悉了,最近再做项目发现有同事写了这样的代码 if (action != null) { id = Request.QueryString[" ...
- 全文检索引擎[asp版]
search.asp: <% set DM=server.CreateObject("DeepMap.HLL")pnn=0: wdd="": pnn=Re ...
- ASP版_阿里大于短信API Demo
阿里大于申请地址:http://www.alidayu.com 阿里大于短信发送Demo: ******index.asp************* <%@LANGUAGE="VBSC ...
- RC4 加密算法asp版
Function RC4(data, Key) ), k(), outstr, Acii, j, tst, xre1, xre2, temp, x, t, y, qwe, zxc s(i) = i - ...
- python os用法精简版
import os print(os.getcwd()) #返回当前路径,无参数 print(os.listdir('E:\zsfile')) #该路径下所有文件名 os.remove('E:\zsf ...
随机推荐
- 设计模式(六):Singleton 单件模式 -- 创建型模式
1.定义 当需要控制一个类的实例数量且调用者可以从一个公共的访问点访问时. 2.适用场景 1. 当类只能有一个实例而且客户可以从一个众所周知的访问点访问它时. 2. 当这个唯一实例应该是通过子类化可扩 ...
- Longest Palindromic Substring——LeetCode
Given a string S, find the longest palindromic substring in S. You may assume that the maximum lengt ...
- Binary Tree Level Order Traversal II——LeetCode
Given a binary tree, return the bottom-up level order traversal of its nodes' values. (ie, from left ...
- STL_iterator迭代器(2)——几种迭代器对象的用法
要学会使用迭代器和容器以及算法,需要学习下面的新技术. 一.流和迭代器 本书的很多例子程序使用I/O流语句来读写数据.例如: int value; cout << "Enter ...
- HDU_1071——积分求面积,抛物线顶点公式
Problem Description Ignatius bought a land last week, but he didn't know the area of the land becaus ...
- windows 编程 —— 消息与参数(滚动条、键盘、鼠标)
目录: 滚动条 键盘 鼠标 滚动条ScrollBar 发送消息:WM_VSCROLL和WM_HSCROLL 参数wParam:wParam消息参数被分为一个低字组和一个高字组.wParam的低字组是一 ...
- div+css 圆角加阴影
.test{ display: inline-block; padding: 5px 10px 6px; text-decoration: none; border-radius: 5px; -moz ...
- Hibernate 关于load和get方法区别
load和个体方法都可以充分利用内部缓存和二级缓存中的现有数据. ******************************************************************* ...
- SpriteKit所有的类
1.SKAction 2.SKCropNode 3.SKEffectNode 4.SKEmitterNode 5.SKKeyframeSequence 6.SKLabelNode 7.SKNode 8 ...
- [AngularJS] Exploring the Angular 1.5 .component() method
Angualr 1.4: .directive('counter', function counter() { return { scope: {}, restrict: 'EA', transclu ...