删除 出错(菜鸟求助)
<script language="javascript" src="../include/js.js"></script>
<link href="../include/iframe.css" rel="stylesheet" type="text/css" />
<!--#include file="../db/conn.asp" -->
<%
function del(temp)
sql_del="delete from a where id="&temp
conn.execute sql_del,,adcmdtext+adexecutenorecords
response.write "<script>alert('删除成功!');window.location.reload();</script>"
end function
%>
<div id="div_div">
<div id="contents">
<fieldset>
<legend>规章制度</legend>
<br />
<%
sql="select * from a where type='"&"规章制度"&"' order by adddate desc"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,3
if rs.eof and rs.bof then
response.write "<p>暂无规章制度</p>"
else
dim i
i=1
do while not rs.eof and i<=10
%>
<span class="title"><%=i%>.<%=rs("title")%></span>
<span class="date">(<%=rs("adddate")%>)</span>
<span class="delete">修改</span>
<span class="delete" onclick="del(<%=rs("id")%>)">删除</span>
<br />
<%
rs.movenext
i=i+1
loop
end if
rs.close
set rs=nothing
conn.close
set rs=nothing
%>
<br />
</fieldset>
</div>
</div>
<style type="text/css">
#contents{
position:relative;
width:80%;
margin-top:50px;
}
.title{
padding:0px;
margin-left:25px;
cursor:pointer;
font-size:14px;
color:red;
float:left;
height:22px;
}
.delete{
padding:0px;
margin-left:10px;
cursor:pointer;
font-size:14px;
color:#666666;
float:left;
height:22px;
}
.date{
padding:0px;
margin-left:10px;
font-size:14px;
color:#cccccc;
float:left;
height:22px;
}
</style>
========================================
什么地方错了