将其调用后...我不会将它的内容放入数据库...请教..有代码吗? 可以共享吗??
无人回复...自己顶一下...
提交按钮是不受编辑器影响的 在同一个表单里定义个按钮就行!!!,然后接受内容,然后插入数据库就行!! 我原来做的一个你看看代码!!
<script language="javascript">
function Chkforms(){
if (document.qynews.title.value==''){
alert("请输入标题!")
qynews.title.focus()
return false
}
if (document.qynews.zuozhe.value==''){
alert("请输入作者!")
qynews.zuozhe.focus()
return false
}
if (document.qynews.laiyuan.value==''){
alert("请输入来源!")
qynews.laiyuan.focus()
return false
}
if (document.qynews.tianjia.value==''){
alert("请输入添加!")
qynews.tianjia.focus()
return false
}
return true
}
</script>
<form name="qynews" method="post" action="saveqy.asp" onsubmit="return Chkforms()">
<p align="center">标题:
<input name="title" type="text" id="title" size="30" />
<br />
<br />
作者:
<input name="zuozhe" type="text" id="zuozhe" size="30" />
<br />
<br />
来源:
<input name="laiyuan" type="text" id="laiyuan" size="30" />
<br />
<br />
添加:
<input name="tianjia" type="text" id="tianjia" size="30" />
<br />
<br />
<span class="STYLE1">内容:</span></p>
<div align="center">
<textarea name="contents" style="display:none"></textarea>
<iframe ID="eWebEditor1" src="edit/ewebeditor.asp?id=contents&style=s_newssystem" frameborder="0" scrolling="no" width="560" HEIGHT="350"></iframe> ‘我用的是ewebeditor在线编辑器,每个版本调用的方法可能不同吧
<br />
<br />
<label>
<input type="submit" name="Submit" value="提交" />
</label>
<input type="reset" name="Submit2" value="重置" />
<br>
</div>
</form>
saveqy.asp
<%
VID=request.QueryString("ID")
If request.Form("flag") <> "edit" then
%>
<%
Vtitle=cstr(trim(request.Form("title")))
Vzuozhe=cstr(trim(request.Form("zuozhe")))
Vlaiyuan=cstr(trim(request.Form("laiyuan")))
Vtianjia=cstr(trim(request.Form("tianjia")))
Vcontent=cstr(trim(request.Form("contents")))
Vtime=date
Set rs=Server.CreateObject("ADODB.Recordset")
sql="Insert Into qydt (title,zuozhe,laiyuan,tianjia,contents,ctime) Values ('"&Vtitle&"','"&Vzuozhe&"','"&Vlaiyuan&"','"&Vtianjia&"','"&Vcontent&"','"&Vtime&"')"
rs.open sql,conn,1,3
response.Write "<script>alert('新闻添加成功!');location.href='addqy.asp' </script>"
rs.close
Set rs=Nothing
Conn.close
Set Conn=Nothing
%>
<%
Else
Vtitle=cstr(trim(request.Form("title")))
Vzuozhe=cstr(trim(request.Form("zuozhe")))
Vlaiyuan=cstr(trim(request.Form("laiyuan")))
Vtianjia=cstr(trim(request.Form("tianjia")))
Vcontent=cstr(trim(request.Form("contents")))
Vtime=cstr(trim(request.Form("date")))
Set rs1=Server.CreateObject("ADODB.RECORDSET")
sql1="select * from qydt where ID="&VID
rs1.open sql1,conn,1,3
rs1("title")=Vtitle
rs1("zuozhe")=Vzuozhe
rs1("laiyuan")=Vlaiyuan
rs1("tianjia")=Vtianjia
rs1("contents")=Vcontent
rs1("ctime")=Vtime
rs1.update
response.Write("<script>alert('新闻更改成功!');location.href='qyxwgl.asp';</script>")
rs1.close
Set rs1=Nothing
Conn.close
Set Conn=Nothing
%>
<%End If %>