PHP开发者频道 php go! » PHP初学者 » ewebeditor 是如何存储的 转到动态网页
本页主题: ewebeditor 是如何存储的 加为IE收藏 | 收藏主题 | 上一主题 | 下一主题

lihoqi88
级别: 新手上路

查看作者资料 发送短消息加为好友 对该用户使用道具
精华: 0
发帖: 8
威望: 8 点
金钱: 80 RMB
贡献值: 0 点
好评度: 0 点
在线时间:0(小时)
注册时间:2008-07-30
最后登录:1970-01-01
引用回复这个帖子 推荐此帖


ewebeditor 是如何存储的


就像我在发表问题的这个框一样,是如何存储的

顶端 Posted:2008-07-30 11:57 | [楼 主]
admin
级别: 管理员

查看作者资料 发送短消息加为好友 对该用户使用道具
精华: 0
发帖: 33
威望: 33 点
金钱: 330 RMB
贡献值: 0 点
好评度: 0 点
在线时间:1(小时)
注册时间:2008-03-19
最后登录:1970-01-01
引用回复这个帖子 推荐此帖



1)将eWebeditor生成的代码粘贴到网页中。
2)JavaScript的调用方法[eWebeditorID].getHTML();获得HTML代码。

顶端 Posted:2008-07-30 12:17 | 1 楼
admin
级别: 管理员

查看作者资料 发送短消息加为好友 对该用户使用道具
精华: 0
发帖: 33
威望: 33 点
金钱: 330 RMB
贡献值: 0 点
好评度: 0 点
在线时间:1(小时)
注册时间:2008-03-19
最后登录:1970-01-01
引用回复这个帖子 推荐此帖



用JavaScript提交数据比如
<html>
<head>
<title>在线文章发布系统</title>
<script language="javascript" >
function Page_Submit()
{
var ArtTitle;//文章标题变量
var ArtBody;//文章内容变量
ArtBody=eWebEditor1.getHTML();//获得文章的内容
ArtTitle=this.ArtTitle.value;//获得文章标题
if(ArtBody=="")
{
alert('文章内容不能为空');
return false;
}
if(ArtTitle=="")
{
alert('文章标题不能为空');
return false;
}
//将数据给隐藏表单
document.SubForm.ArtBody.value=ArtBody;
document.SubForm.ArtTitle.value=ArtTitle;
document.SubForm.submit();//提交表单
}
</script>
</head>
<body>
文章标题:<input type="text" name="ArtTitle" /><br>
文章内容:<iframe ID="eWebEditor1" src="ewebeditor/ewebeditor.asp?id=content&style=standard" frameborder="0" scrolling="no" width="600" HEIGHT="350"></iframe>
<input type="button" name="SubBtn" onClick="Page_Submit();" value="提交文章" />
<form name="SubForm" method="post" action="……" >
<!--这里省略提交到的页面URL-->
<input type="hidden" name="ArtTitle" />
<input type="hidden" name="ArtBody" />
</form>
</body>
</html>

顶端 Posted:2008-07-30 12:18 | 2 楼
admin
级别: 管理员

查看作者资料 发送短消息加为好友 对该用户使用道具
精华: 0
发帖: 33
威望: 33 点
金钱: 330 RMB
贡献值: 0 点
好评度: 0 点
在线时间:1(小时)
注册时间:2008-03-19
最后登录:1970-01-01
引用回复这个帖子 推荐此帖



。net的

请看示例,另外,你页面的状态保持不能关闭: 
  1.页面代码 
  <form  id="Form1"  method="post"  runat="server"> 
  <P> 
  <asp:TextBox  id="d_content"  runat="server"  TextMode="MultiLine"></asp:TextBox> 
  <IFRAME  id="eWebEditor1"  frameBorder="0"  width="594"  scrolling="no"  height="350"  runat="server"> 
  </IFRAME> 
  <BR> 
  <asp:Button  id="Button1"  runat="server"  Text="提交"></asp:Button></P> 
  <P> 
  <asp:Label  id="Label1"  runat="server">Label</asp:Label></P> 
  </form> 
   
   
  2.后台代码 
  private  void  Page_Load(object  sender,  System.EventArgs  e) 
  { 
  this.d_content.Style.Add("display","none"); 
  this.eWebEditor1.Attributes.Add("src","../medit/ewebeditor.asp?id=d_content&style="); 
  } 
   
  private  void  Button1_Click(object  sender,  System.EventArgs  e) 
  { 
  this.Label1.Text  =  this.d_content.Text; 
  } 

顶端 Posted:2008-07-30 12:19 | 3 楼
lihoqi88
级别: 新手上路

查看作者资料 发送短消息加为好友 对该用户使用道具
精华: 0
发帖: 8
威望: 8 点
金钱: 80 RMB
贡献值: 0 点
好评度: 0 点
在线时间:0(小时)
注册时间:2008-07-30
最后登录:1970-01-01
引用回复这个帖子 推荐此帖



谢谢。明白了

顶端 Posted:2008-07-30 12:38 | 4 楼
老刘
级别: 新手上路

查看作者资料 发送短消息加为好友 对该用户使用道具
精华: 0
发帖: 12
威望: 12 点
金钱: 120 RMB
贡献值: 0 点
好评度: 0 点
在线时间:0(小时)
注册时间:2008-07-30
最后登录:1970-01-01
引用回复这个帖子 推荐此帖



有点乱,,楼主整理一下撒

顶端 Posted:2008-07-30 13:22 | 5 楼

 PHP开发者频道 php go! » PHP初学者
快速发帖 顶端
内容
HTML 代码不可用

使用签名
Wind Code自动转换

字数检查 恢复数据
按 Ctrl+Enter 直接提交
表情 [更多]
Powered by PHPWind v6.0 Code © 2003-05 PHPWind
This is html template view this page faster