以文本方式查看主题

-  ╋艺 镇╋  (http://zyzsky.com/bbs/index.asp)
--  ┣◇网站建设&Web语言  (http://zyzsky.com/bbs/list.asp?boardid=4)
----  ewebeditor使用教程  (http://zyzsky.com/bbs/dispbbs.asp?boardid=4&id=1923)

--  作者:admin
--  发布时间:2009/10/24 22:06:45
--  ewebeditor使用教程

我们在文章编辑中经常使用文章插件:EwebEditor.

而如何使用却令所有人非常头疼.现给出提交表单的方法,本文采用v2.8:

<form method="post" action="save.asp">
<INPUT type="hidden" name="content1" value=""/>
<IFRAME ID="eWebEditor1" src="editor/eWebEditor.asp?id=content1&style=s_coolblue" frameborder="0" scrolling="no" width="550" height="350"></IFRAME>
</form>

这样,你就可以在表单中编辑文章了.效果如图:图片点击可在新窗口打开查看

上传表单数据获取,明天讲述ewebeditor如何对已经存在的文章进行编辑!

dim sContent,i
for i=1 to request.Form(”content1″).Count
sContent=sContent&request.Form(”content1″)(i)
next

通过以上代码,可以将数据赋给sContent.然后传至数据库.



最上面目的是让在ewebeditor编辑的内容传到content1值当中,当页提交时,编辑器经过转换将值赋到content1里
如何转换呢?就是编辑器先取得INPUT的ID ,就是content1,然后将内容传到编辑器中的content1,但因为
<INPUT type="hidden" name="content1" value=""/>
<IFRAME ID="eWebEditor1" src="editor/eWebEditor.asp?id=content1&style=s_coolblue" frameborder="0" scrolling="no" width="550" height="350"></IFRAME>这样的代码在一个文件里,所以编辑器里的content1值就是INPUT中content1的值,在rs读取的时候,rs("content1")的值就是编辑器里的值了