| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 2554 人关注过本帖
标题:为什么我用的eWebEditor再现编辑器没有默认编辑状态啊???
只看楼主 加入收藏
yms123
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
威 望:209
帖 子:12488
专家分:19042
注 册:2004-7-17
收藏
得分:0 

把那个页面的代码贴上来。

2007-04-12 09:55
boyfuture
Rank: 1
等 级:新手上路
帖 子:552
专家分:0
注 册:2005-12-20
收藏
得分:0 
以下是引用boyfuture在2007-4-11 20:34:23的发言:
是啊,我也奇怪。更有意思的是我保存的东西,读出来的竟然每个开始处都有这么个符号%>,谁能帮帮我们呢

这个问题为什么没有人理睬呢?每个开始处都有这么个符号%>?

2007-04-12 09:55
dh2007
Rank: 1
等 级:新手上路
帖 子:228
专家分:0
注 册:2007-2-28
收藏
得分:0 


<IFRAME ID="eWebEditor1" name="eWebEditor1" SRC="eWebEditor/ewebeditor.asp?id=artbody&style=s_blue" FRAMEBORDER="0" SCROLLING="no" WIDTH="550" HEIGHT="350"></IFRAME>
<input type="hidden" name="artbody">
改成
<IFRAME ID="eWebEditor1" name="eWebEditor1" SRC="eWebEditor/ewebeditor.asp?id=artbody&style=s_blue" FRAMEBORDER="0" SCROLLING="no" WIDTH="550" HEIGHT="350"></IFRAME>
<input type="hidden" name="artbody">

阳光白雪帮我解决了!
谢谢大家

[此贴子已经被作者于2007-4-12 10:07:41编辑过]


2007-04-12 09:57
yms123
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
威 望:209
帖 子:12488
专家分:19042
注 册:2004-7-17
收藏
得分:0 

<!--#include file="conn.asp" -->

<%
'if session("user_name")="" or session ("id")="" then
'response.write "<script language=JavaScript>" & chr(13) & "alert('对不起,你无权查看此页!');" & "window.location.href = 'ht_dl.asp'"&" </script>"
'end if
%>


<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<style type="text/css">TD {
COLOR: #365885; FONT-FAMILY: "宋体"; FONT-SIZE: 9pt; FONT-STYLE: normal; FONT-WEIGHT: normal
}
A:link {
COLOR: #365885; FONT-FAMILY: "宋体"; FONT-SIZE: 9pt; line-height:150%; FONT-STYLE: normal; FONT-WEIGHT: normal; TEXT-DECORATION: none
}
A:visited {
COLOR: #365885; FONT-FAMILY: "宋体"; FONT-SIZE: 9pt; FONT-STYLE: normal; FONT-WEIGHT: normal; TEXT-DECORATION: none
}
A:hover {
COLOR: #365885; FONT-FAMILY: "宋体"; FONT-SIZE: 9pt; FONT-STYLE: normal; FONT-WEIGHT: normal; TEXT-DECORATION: underline
}
</style>

<title>WELCOME</title>

<script language="javascript" >
function Page_Submit()
{
if(document.news.news_type.value=="")
{
alert('文章类别不能为空');
return false;
}
if(document.news.title.value=="")
{
alert('文章标题不能为空');
return false;
}
if(document.news.name.value=="")
{
alert('发布者不能为空');
return false;
}
var artbody;//文章标题变量
artbody=document.eWebEditor1.getHTML();//获得文章的内容
if(artbody=="")
{
alert('文章内容不能为空');
return false;
}
//将数据给隐藏表单
document.news.artbody.value=artbody;
document.news.submit();//提交表单

}


function Show(){
if(document.news.news_type.value=="")
{
alert('文章类别不能为空');
return false;
}
if(document.news.title.value=="")
{
alert('文章标题不能为空');
return false;
}
if(document.news.name.value=="")
{
alert('发布者不能为空');
return false;
}
var artbody;//文章标题变量
artbody=document.eWebEditor1.getHTML();//获得文章的内容
if(artbody=="")
{
alert('文章内容不能为空');
return false;
}
//将数据给隐藏表单
document.news.artbody.value=artbody;
document.news.action = "show.asp";
document.news.target = "_blank";
document.news.submit();//提交表单
}
function Page_Load()
{
eWebEditor1.setMode('EDIT');
}
</script>

</head>
<body topmargin="0" onLoad="Page_Load();">
<!--#include file="ht_top.asp" -->

<table cellpadding="0" cellspacing="0" border="0" align="center" width="1000">
<tr>
<td width="125" valign="top" background="image2/a14.gif" height="550">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" height="21" background="image2/a15.gif">

<p align="center"><font color="#365885">
新闻系统
</font></td>
</tr>
<tr>
<td width="100%"><img border="0" src="image2/a16.gif"></td>
</tr>
<tr>
<td width="100%">
<table border="0" width="100%" cellpadding="5">
<%


sql1="select * from ht_small_class where ht_big_class='新闻系统' order by id"


set rs1=server.createobject("ADODB.Recordset")
rs1.open sql1,conn,1,1
if rs1.eof or rs1.bof then
%>
<tr>

<td align="center"><span style="font-size:9.0pt;mso-bidi-font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
&quot;Times New Roman&quot;;mso-hansi-font-family:&quot;Times New Roman&quot;;mso-bidi-font-weight:
bold">暂时没有开通<br>此功能!</span></td>
</tr>
<tr>
<%
end if
do while not rs1.eof
%>
<tr>
<td width="32%" align="center">
<p align="right"><img border="0" src="image2/a17.gif"></td>
<td width="68%" align="left"><span style="font-size:9.0pt;mso-bidi-font-size:12.0pt;font-family:宋体;mso-ascii-font-family:
&quot;Times New Roman&quot;;mso-hansi-font-family:&quot;Times New Roman&quot;;mso-bidi-font-weight:
bold"><a href="<%=rs1("url")%>"><%=rs1("ht_small_class")%></a></span></td>
</tr>

<%
rs1.movenext
loop
rs1.close
set rs1=nothing

%>


</table>
</td>
</tr>
<tr>
<td width="100%" background="image2/a23.gif" height="34">
<p align="center"><font color="#365885"><a href="exit.asp" >退出登陆</a></font>
</td>
</tr>
<tr>
<td width="100%">
<div align="center">
<center>
<table border="0" width="78%" cellspacing="0" cellpadding="0">
<tr>
<td width="100%">
<hr size="1" color="#FFFFFF">
</td>
</tr>
</center>
<tr>
<td width="100%">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>



<td width="29%">
<p align="right"><img border="0" src="image2/a22.gif"></td>
<center>
<td width="71%" valign="bottom"><font color="#365885"><b>&nbsp;新闻发布
</b></font></td>

</tr>
</table>
</center>
</td>
</tr>
<tr>
<td width="100%"></td>
</tr>
<tr>
<td width="100%"></td>
</tr>
<tr>
<td width="100%"></td>
</tr>
</table>
</div>
</td>
</tr>
<tr>
<td width="100%"></td>
</tr>
<tr>
<td width="100%"></td>
</tr>
</table>
</td>
<td width="865" valign="top" align="center" bgcolor="F7F7F7">


<table border="0" cellpadding="3" cellspacing="0" align="center" width="95%">
<form action="p_new_upload.asp" onSubmit="Page_Submit();return false;" enctype="multipart/form-data" method="post" name="news">
<tr>
<td height="5" colspan="2"></td>
</tr>
<tr>
<td></td>
<td ><font size="+1" color="#FF0000"> <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;新闻上传</font></p></td>
</tr>
<tr>
<td align="right" width="10%">新闻类别: </td>
<td>
<select name="news_type">
<%

set rs1=server.CreateObject("ADODB.Recordset")
sql1="select * from news_type where news_number=1 order by id"
rs1.open sql1,conn,1,1
if not rs1.bof or rs1.eof then

do while not rs1.eof
%>
<option value="1<%=rs1("news_type")%>">
+ <%=rs1("news_type")%>
</option>
<%
set rs2=server.CreateObject("ADODB.Recordset")
sql2="select * from news_type where news_number=2 and news_dy1='" & rs1("news_dy1") & "' order by id"
rs2.open sql2,conn,1,1
if not rs2.bof or rs2.eof then
do while not rs2.eof
%>
<option value="2<%=rs2("news_type")%>">
&nbsp;&nbsp;&nbsp; |- <%=rs2("news_type")%>
</option>
<%
set rs3=server.CreateObject("ADODB.Recordset")
sql3="select * from news_type where news_number=3 and news_dy2='" & rs2("news_dy2") & "' order by id"
rs3.open sql3,conn,1,1
if not rs3.bof or rs3.eof then
do while not rs3.eof
%>
<option value="3<%=rs3("news_type")%>">
&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; |- <%=rs3("news_type")%>
</option>
<%
rs3.movenext
loop
rs3.close
set rs3=nothing
end if
rs2.movenext
loop
rs2.close
set rs2=nothing
end if
rs1.movenext
loop
else

%>
<option value='0'>暂时没有分类</option>
<%
end if
rs1.close
set rs1=nothing
%>
</select>
</td>
</tr>
<tr>
<td align="right" width="10%">新闻标题: </td>
<td><input type="text" name="title" maxlength="30" size="30"> (不大于30个字符)</td>
</tr>
<tr>
<td align="right">发布者: </td>
<td><input type="text" name="name" maxlength="15" size="30"> (不大于15个字符)</td>
</tr>
<tr>
<td valign="top" align="right">新闻内容: </td>
<td><!--textarea name="news" cols="100" rows="20"></textarea-->
<IFRAME ID="eWebEditor1" name="eWebEditor1" SRC="eWebEditor/ewebeditor.asp?id=XXX&style=s_blue" FRAMEBORDER="0" SCROLLING="no" WIDTH="550" HEIGHT="350"></IFRAME>
<input type="hidden" name="artbody">
</td>
</tr>
<tr>
<td align="right">图片上传: </td>
<td><input type="file" name="img">(上传图片由此处,编辑器不提供上传功能 [图片大小:800*600;文件大小:不大于300K])</td>
</tr>
<tr>
<td align="right">图片说明: </td>
<td><input type="text" name="content" maxlength="20" size="30"> (不大于20个字符)[选填]</td>
</tr>
<tr>
<td>&nbsp;</td>
<td colspan="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type=submit name=button1 value="提交"> &nbsp;&nbsp;<input type="button" name="Submit2" value="预览" onClick="Show()"/>
&nbsp;&nbsp;<input type="reset" value="重置">

</td></tr>
</form>
</table>


</td>
</tr>
</table>
</body>
</html>
这样呢?

2007-04-12 10:04
guyer
Rank: 2
等 级:新手上路
威 望:5
帖 子:451
专家分:0
注 册:2007-1-19
收藏
得分:0 
以下是引用boyfuture在2007-4-12 9:55:59的发言:

这个问题为什么没有人理睬呢?每个开始处都有这么个符号%>?

在代码里去掉啊


http://www./
2007-04-12 10:10
guyer
Rank: 2
等 级:新手上路
威 望:5
帖 子:451
专家分:0
注 册:2007-1-19
收藏
得分:0 
以下是引用dh2007在2007-4-12 9:57:19的发言:


<IFRAME ID="eWebEditor1" name="eWebEditor1" SRC="eWebEditor/ewebeditor.asp?id=artbody&style=s_blue" FRAMEBORDER="0" SCROLLING="no" WIDTH="550" HEIGHT="350"></IFRAME>
<input type="hidden" name="artbody">
改成
<IFRAME ID="eWebEditor1" name="eWebEditor1" SRC="eWebEditor/ewebeditor.asp?id=artbody&style=s_blue" FRAMEBORDER="0" SCROLLING="no" WIDTH="550" HEIGHT="350"></IFRAME>
<input type="hidden" name="artbody">

阳光白雪帮我解决了!
谢谢大家


没看出啥区别来(除了颜色变了)


http://www./
2007-04-12 10:20
yms123
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
威 望:209
帖 子:12488
专家分:19042
注 册:2004-7-17
收藏
得分:0 
onLoad事件在body原素里写的。
2007-04-12 10:31
boyfuture
Rank: 1
等 级:新手上路
帖 子:552
专家分:0
注 册:2005-12-20
收藏
得分:0 

我是通过ewebedit编辑器完成的,上传的资料,从数据库里再读出的时候,每个文章开始的时候都有个"%>"符号,可能是什么原因呢?

2007-04-14 11:37
guyer
Rank: 2
等 级:新手上路
威 望:5
帖 子:451
专家分:0
注 册:2007-1-19
收藏
得分:0 

把代码帖出来看看


http://www./
2007-04-16 13:39
快速回复:为什么我用的eWebEditor再现编辑器没有默认编辑状态啊???
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.016567 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved