主题: 大家好,我是初学asp的一个学生 |
作者: 付伟, 发布日期: 2012-11-23 13:17:06, 浏览数: 2624 |
我按照官网上的步骤去做的 1.在需要显示编辑器的位置添加textarea输入框。
<textarea id="editor_id" name="content" style="width:700px;height:300px;"> <strong>HTML内容</strong> </textarea> 2.在该HTML页面添加以下脚本。 <script charset="utf-8" src="/editor/kindeditor.js"></script> <script charset="utf-8" src="/editor/lang/zh_CN.js"></script> <script> var editor; KindEditor.ready(function(K) { editor = K.create('#editor_id'); }); </script> 做完这两步之后,然后就用了,结果插入记录的时候提示:
Microsoft JET Database Engine 错误 '80040e10' 参数 ?_2 没有默认值。 /2.asp,行 26
谁能帮帮我,下面是我的代码: <%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%> <!--#include file="Connections/conn.asp" --> <% Dim MM_editAction MM_editAction = CStr(Request.ServerVariables("SCRIPT_NAME")) If (Request.QueryString <> "") Then MM_editAction = MM_editAction & "?" & Server.HTMLEncode(Request.QueryString) End If ' boolean to abort record edit Dim MM_abortEdit MM_abortEdit = false %> <% If (CStr(Request("MM_insert")) = "form1") Then If (Not MM_abortEdit) Then ' execute the insert Dim MM_editCmd Set MM_editCmd = Server.CreateObject ("ADODB.Command") MM_editCmd.ActiveConnection = MM_conn_STRING MM_editCmd.CommandText = "INSERT INTO rizhi (biaoti, neirong) VALUES (?, ?)" MM_editCmd.Prepared = true MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param1", 202, 1, 50, Request.Form("textfield")) ' adVarWChar MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param2", 203, 1, 536870910, Request.Form("editor_id")) ' adLongVarWChar MM_editCmd.Execute MM_editCmd.ActiveConnection.Close ' append the query string to the redirect URL Dim MM_editRedirectUrl MM_editRedirectUrl = "2.asp" If (Request.QueryString <> "") Then If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0) Then MM_editRedirectUrl = MM_editRedirectUrl & "?" & Request.QueryString Else MM_editRedirectUrl = MM_editRedirectUrl & "&" & Request.QueryString End If End If Response.Redirect(MM_editRedirectUrl) End If End If %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <script charset="utf-8" src="/editor/kindeditor.js"></script> <script charset="utf-8" src="/editor/lang/zh_CN.js"></script> <script> var editor; KindEditor.ready(function(K) { editor = K.create('#editor_id'); }); </script> <title>学习使用kindeditor</title> </head> <body> <form id="form1" name="form1" method="POST" action="<%=MM_editAction%>"> <table width="900" border="0" cellspacing="0" cellpadding="5"> <tr> <td><label for="textfield"></label> <input type="text" name="textfield" id="textfield" /></td> </tr> <tr> <td><textarea id="editor_id" name="content" cols="45" rows="5" ></textarea></td> </tr> <tr> <td><input type="submit" name="button" id="button" value="提交" /></td> </tr> </table> <input type="hidden" name="MM_insert" value="form1" /> </form> </body> </html>
|