http://lucky.myrice.com/javascriptexam/htmleditor/editor/editor.htm 的编辑器数据获取问题

Arbow 2003-06-26 04:07:52
http://lucky.myrice.com/javascriptexam/htmleditor/editor/editor.htm
的html编辑器,用
<OBJECT id="Content_html" style="LEFT: 0px; TOP: 0px" data="./editor/editor.htm" width=700 height=610 type="text/x-scriptlet" VIEWASTEXT></OBJECT>
嵌入页面中调用,不能通过
document.Content_html.value
获取编辑器内容。
而换成CSDN文档中心那样的编辑器却可以获取。

请教怎样才能获取
http://lucky.myrice.com/javascriptexam/htmleditor/editor/editor.htm
这个编辑器的数据?
...全文
72 9 打赏 收藏 转发到动态 举报
写回复
用AI写文章
9 条回复
切换为时间正序
请发表友善的回复…
发表回复
Arbow 2003-06-28
  • 打赏
  • 举报
回复
呵呵,这文章早看过了。
不过我想大家没有看清楚我说的:

换成CSDN文档中心那样的编辑器却可以获取
**************************************

这个已经说明了我已经在用一个文本框保存编辑器的内容。

------------------------------------------
你们把下面的代码保存,当修改到点击post时可以把编辑器的数据保存到文本框的时候,把代码贴出来,马上结贴。

<html>
<body>
<table width="90%" align="center">
<tr>
<td>
<Script LANGUAGE="JavaScript">
function SubmitCheck(){
document.AddArticle.Content.value = document.AddArticle.Content_html.value;
}

</script>

<form name="AddArticle" method="post">
<table width="100%" border="1" bordercolor="#999999">
<tr style="display:yes">
<td width="90" align="left">Content:<font color="#FF0000"></font><br>
</td>
<td>
<textarea name="Content" cols="80" rows="10"></textarea>
<font color="#FF0000"></font>
</td>
</tr>
<tr>
<td width="90" align="left">Content:<font color="#FF0000"></font><br>
</td>
<td><OBJECT id="Content_html" style="LEFT: 0px; TOP: 0px" data="http://lucky.myrice.com/javascriptexam/htmleditor/editor/editor.htm" width="700" height="610" type="text/x-scriptlet" VIEWASTEXT></OBJECT>
</td>
</tr>
<tr>
<td colspan="2">
<input type="button" name="SubmitBtn" value="Post" onclick="SubmitCheck()" >
</td>
</tr>
</table>
</form>
chinahuman 2003-06-28
  • 打赏
  • 举报
回复
用document.form1.Content_html.value,这个可以在本地取得值,但是无法传到服务器上,所以在本地还要再设一个表单,比如说叫:content。然后用document.form1.count.value=document.form1.Content_html.value赋一下值,然后再传到服务器上。还有可以参看一下宝玉的这一篇文章:http://www.csdn.net/Develop/Read_Article.asp?Id=15214
Arbow 2003-06-28
  • 打赏
  • 举报
回复
不行,不知道你们是不是真的做过试验。
我用的是
<OBJECT id="Content_html" style="LEFT: 0px; TOP: 0px" data="./editor/editor.htm" width=700 height=610 type="text/x-scriptlet" VIEWASTEXT></OBJECT>
来调用编辑器,就是那个./editor/editor.htm页面,document.frames.Editor.document.body.outerHTML
只适合那个页面自己调用。
jsidiot 2003-06-28
  • 打赏
  • 举报
回复
我不太懂你说的是什么 意思

我知道了
你用
document.frames.Editor.document.body.outerHTML
可以取道数据的
Arbow 2003-06-27
  • 打赏
  • 举报
回复
再顶
chinahuman 2003-06-27
  • 打赏
  • 举报
回复
可以通过:document.frames.Editor.document.body.innerHTML来读取
ltayo 2003-06-27
  • 打赏
  • 举报
回复
up
Arbow 2003-06-26
  • 打赏
  • 举报
回复
自己顶
saintKnight 2003-06-26
  • 打赏
  • 举报
回复
帮你向上顶!

87,988

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧