请教一下关于kindeditor与ASP后台整合,如何取到值提交数据库保存,帮忙改一下新手一个。全部分给你。 30
Newsadd.asp页面文件名<html><head><METAhttp-equiv=Content-Typecontent="text/html;charset=gb...
Newsadd.asp 页面文件名
<html>
<head>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<LINK href="Style.css" type=text/css rel=stylesheet>
<title>添加文章</title>
<link href="editor/themes/default/default.css" rel="stylesheet" />
<script src="editor/kindeditor-all-min.js"></script>
<script src="editor/lang/zh-CN.js"></script>
<script>
KindEditor.ready(function(K) {
window.editor = K.create('#editor_id');
});
</script>
<body topmargin="0">
<table border="1" cellspacing="0" width="100%" cellpadding="0"bordercolor="1" style="border-collapse: collapse">
<form name="form1" method="post" action="NewsSave.asp" OnSubmit="return checkdata()" onReset="return ResetForm();">
<tr>
<td align="right" class="unnamed2" valign="middle" bgcolor="#FFFFFF">文章标题:</td>
<td bgcolor="#FFFFFF"> <span style='cursor:hand' title='缩短对话框' onClick='if (me.size>10)me.size=me.size-2'>-</span>
<input name="title" id=me type="TEXT" size=60 maxlength=100 value="试用信息中"style="background-color:ffffff;border: 1 double" onMouseOver="window.status='在这里输入要添加的文章标题,必填';return true;" onMouseOut="window.status='';return true;" >
</td>
</tr>
<tr>
<td align="right" valign="top" class="unnamed2" bgcolor="#FFFFFF" height="145">文章内容:<br><font color="#FF0000">*</font><br><br><br><br><br><br><br><br><br><br>换行请按Shift+Enter<br><br>另起一段请按Enter</td>
<td valign="top">
<textarea id="editor_id" name="content" cols="100" rows="8" style="width:800px;height:400px;visibility:hidden;"></textarea>
</td>
</tr>
<tr align="center">
<td colspan="2" height="25" width="100%" clacc="TDtop">
<input type="button" value=" 返 回 " onClick="javascript:history.go(-1)" class="unnamed5" style="font-size: 9pt; color: #000000; background-color: #EAEAF4; solid #EAEAF4" onMouseOver ="this.style.backgroundColor='#ffffff'" onMouseOut ="this.style.backgroundColor='#EAEAF4'">
<input type="submit" value=" 添 加 " name="Submit" class="unnamed5" OnClick="fnPreHandle()" style="font-size: 9pt; color: #000000; background-color: #EAEAF4; solid #EAEAF4" onMouseOver ="this.style.backgroundColor='#ffffff'" onMouseOut ="this.style.backgroundColor='#EAEAF4'">
<input type="reset" value=" 清 除 " name="Reset" class="unnamed5" style="font-size: 9pt; color: #000000; background-color: #EAEAF4; solid #EAEAF4" onMouseOver ="this.style.backgroundColor='#ffffff'" onMouseOut ="this.style.backgroundColor='#EAEAF4'">
</td>
</tr>
</form>
</table>
</td>
</tr>
</table>
</body>
</html>
NewsSave.asp 文件名
<!--#include file="Conn.asp"-->
<!--#include file="ChkManage.asp" -->
<%
title=request.form("title")
content=request.form("content")
set rs=server.createobject("adodb.recordset")
sql="select * from News"
rs.open sql,conn,1,3
rs.addnew
rs("title")=title
rs("content")=editor
rs("UpdateTime")=now()
rs.update
rs.close
Show_Message("<p align=center><font color=red>恭喜您,文章“"&title&"”已经成功添加!<br><br>"&freetime&"秒钟后返回上页!</font>")
response.end
%> 展开
<html>
<head>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<LINK href="Style.css" type=text/css rel=stylesheet>
<title>添加文章</title>
<link href="editor/themes/default/default.css" rel="stylesheet" />
<script src="editor/kindeditor-all-min.js"></script>
<script src="editor/lang/zh-CN.js"></script>
<script>
KindEditor.ready(function(K) {
window.editor = K.create('#editor_id');
});
</script>
<body topmargin="0">
<table border="1" cellspacing="0" width="100%" cellpadding="0"bordercolor="1" style="border-collapse: collapse">
<form name="form1" method="post" action="NewsSave.asp" OnSubmit="return checkdata()" onReset="return ResetForm();">
<tr>
<td align="right" class="unnamed2" valign="middle" bgcolor="#FFFFFF">文章标题:</td>
<td bgcolor="#FFFFFF"> <span style='cursor:hand' title='缩短对话框' onClick='if (me.size>10)me.size=me.size-2'>-</span>
<input name="title" id=me type="TEXT" size=60 maxlength=100 value="试用信息中"style="background-color:ffffff;border: 1 double" onMouseOver="window.status='在这里输入要添加的文章标题,必填';return true;" onMouseOut="window.status='';return true;" >
</td>
</tr>
<tr>
<td align="right" valign="top" class="unnamed2" bgcolor="#FFFFFF" height="145">文章内容:<br><font color="#FF0000">*</font><br><br><br><br><br><br><br><br><br><br>换行请按Shift+Enter<br><br>另起一段请按Enter</td>
<td valign="top">
<textarea id="editor_id" name="content" cols="100" rows="8" style="width:800px;height:400px;visibility:hidden;"></textarea>
</td>
</tr>
<tr align="center">
<td colspan="2" height="25" width="100%" clacc="TDtop">
<input type="button" value=" 返 回 " onClick="javascript:history.go(-1)" class="unnamed5" style="font-size: 9pt; color: #000000; background-color: #EAEAF4; solid #EAEAF4" onMouseOver ="this.style.backgroundColor='#ffffff'" onMouseOut ="this.style.backgroundColor='#EAEAF4'">
<input type="submit" value=" 添 加 " name="Submit" class="unnamed5" OnClick="fnPreHandle()" style="font-size: 9pt; color: #000000; background-color: #EAEAF4; solid #EAEAF4" onMouseOver ="this.style.backgroundColor='#ffffff'" onMouseOut ="this.style.backgroundColor='#EAEAF4'">
<input type="reset" value=" 清 除 " name="Reset" class="unnamed5" style="font-size: 9pt; color: #000000; background-color: #EAEAF4; solid #EAEAF4" onMouseOver ="this.style.backgroundColor='#ffffff'" onMouseOut ="this.style.backgroundColor='#EAEAF4'">
</td>
</tr>
</form>
</table>
</td>
</tr>
</table>
</body>
</html>
NewsSave.asp 文件名
<!--#include file="Conn.asp"-->
<!--#include file="ChkManage.asp" -->
<%
title=request.form("title")
content=request.form("content")
set rs=server.createobject("adodb.recordset")
sql="select * from News"
rs.open sql,conn,1,3
rs.addnew
rs("title")=title
rs("content")=editor
rs("UpdateTime")=now()
rs.update
rs.close
Show_Message("<p align=center><font color=red>恭喜您,文章“"&title&"”已经成功添加!<br><br>"&freetime&"秒钟后返回上页!</font>")
response.end
%> 展开
展开全部
假如三天不见,谁会想念。当自己用答案去对照现实,你会流下几滴泪。每个人,最爱的是自己。即使你努力掩饰。
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询