应该是这个的
<%@LANGUAGE="javascript" CODEPAGE="936"%>
<%
if Request.QueryString("fID")="" then
Response.write "情选择删除内容"
else
%>
<%
// *** Restrict Access To Page: Grant or deny access to this page
var MM_authorizedUsers="";
var MM_authFailedURL="login.asp";
var MM_grantAccess=false;
if (String(Session("MM_Username")) != "undefined") {
if (true || (String(Session("MM_UserAuthorization"))=="") || (MM_authorizedUsers.indexOf(String(Session("MM_UserAuthorization"))) >=0)) {
MM_grantAccess = true;
}
}
if (!MM_grantAccess) {
var MM_qsChar = "?";
if (MM_authFailedURL.indexOf("?") >= 0) MM_qsChar = "&";
var MM_referrer = Request.ServerVariables("URL");
if (String(Request.QueryString()).length > 0) MM_referrer = MM_referrer + "?" + String(Request.QueryString());
MM_authFailedURL = MM_authFailedURL + MM_qsChar + "accessdenied=" + Server.URLEncode(MM_referrer);
Response.Redirect(MM_authFailedURL);
}
%>
<%
// *** Edit Operations: declare variables
// set the form action variable
var MM_editAction = Request.ServerVariables("SCRIPT_NAME");
if (Request.QueryString) {
MM_editAction += "?" + Request.QueryString;
}
// boolean to abort record edit
var MM_abortEdit = false;
// query string to execute
var MM_editQuery = "";
%>
<%
// *** Delete Record: declare variables
if (String(Request("MM_delete")) == "form1" &&
String(Request("MM_recordId")) != "undefined") {
var MM_editConnection = MM_Guestbook_STRING;
var MM_editTable = "tbGuestbook";
var MM_editColumn = "fID";
var MM_recordId = "" + Request.Form("MM_recordId") + "";
var MM_editRedirectUrl = "admin.asp";
// append the query string to the redirect URL
if (MM_editRedirectUrl && Request.QueryString && Request.QueryString.Count > 0) {
MM_editRedirectUrl += ((MM_editRedirectUrl.indexOf('?') == -1)?"?":"&") + Request.QueryString;
}
}
%>
<%
// *** Delete Record: construct a sql delete statement and execute it
if (String(Request("MM_delete")) != "undefined" &&
String(Request("MM_recordId")) != "undefined") {
// create the sql delete statement
MM_editQuery = "delete from " + MM_editTable + " where " + MM_editColumn + " = " + MM_recordId;
if (!MM_abortEdit) {
// execute the delete
var MM_editCmd = Server.CreateObject('ADODB.Command');
MM_editCmd.ActiveConnection = MM_editConnection;
MM_editCmd.CommandText = MM_editQuery;
MM_editCmd.Execute();
MM_editCmd.ActiveConnection.Close();
if (MM_editRedirectUrl) {
Response.Redirect(MM_editRedirectUrl);
}
}
}
%>
<%
var Recordset1__MMColParam = "1";
if (String(Request.QueryString("fID")) != "undefined" &&
String(Request.QueryString("fID")) != "") {
Recordset1__MMColParam = String(Request.QueryString("fID"));
}
%>
<%
var Recordset1 = Server.CreateObject("ADODB.Recordset");
Recordset1.ActiveConnection = MM_Guestbook_STRING;
Recordset1.Source = "SELECT * FROM tbGuestbook WHERE fID = "+ Recordset1__MMColParam.replace(/'/g, "''") + "";
Recordset1.CursorType = 0;
Recordset1.CursorLocation = 2;
Recordset1.LockType = 1;
Recordset1.Open();
var Recordset1_numRows = 0;
%>
<%
Response.Expires=-1000
Response.CacheControl="no-cache"
%>
删除页面<%
Recordset1.Close();
%>
<%end if%>
因为报错没有我没有帮进去