L
lyy8848
Unregistered / Unconfirmed
GUEST, unregistred user!
我想用以下程序:
</script>
<script language="VBScript">
function panduan(cans_a,cans_b)
if MsgBox("您是否要删除此记录?", 289,"警告信息!") = 1 then
window.location="del_from_db.asp?delid="&cans_a&"&delbz="&cans_b
end if
End Function
</script>
<a href="#"
onclick=panduan('<%=my_rs("id")%>','My_only')><img border="0" src="images/icon_delete.gif"
align="absmiddle" alt="删除这封信!" width="15" height="15"></a>
del_from_db.asp的程序如下:
<%
if Session("Ulogin")<>"yes" then
Response.Redirect ("login.asp")
end if
del_id=Request("delid")
del_bz=Request("delbz")
response.write "ssssssssssssssssss"
if del_bz<>"My_only" and del_bz<>"My_public" then
Response.Redirect ("index.asp")
end if
if del_bz="My_public" and Session("Urule")<>"a" and Session("Urule")<>"b" then
Response.Redirect ("index.asp")
end if
DataSource=Request.ServerVariables("li")
strconnstring = "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;
Password=sa;
Initial
Catalog=er;"
set my_Conn = Server.CreateObject("ADODB.Connection")
my_Conn.open strConnString
strSql="DELETE jhtdata where name='"&del_id&"'"
my_Conn.Execute (strSql)
my_Conn.Close
set my_Conn = nothing
Response.Redirect ("index.asp")
%>
为什么点击删除没有用?
</script>
<script language="VBScript">
function panduan(cans_a,cans_b)
if MsgBox("您是否要删除此记录?", 289,"警告信息!") = 1 then
window.location="del_from_db.asp?delid="&cans_a&"&delbz="&cans_b
end if
End Function
</script>
<a href="#"
onclick=panduan('<%=my_rs("id")%>','My_only')><img border="0" src="images/icon_delete.gif"
align="absmiddle" alt="删除这封信!" width="15" height="15"></a>
del_from_db.asp的程序如下:
<%
if Session("Ulogin")<>"yes" then
Response.Redirect ("login.asp")
end if
del_id=Request("delid")
del_bz=Request("delbz")
response.write "ssssssssssssssssss"
if del_bz<>"My_only" and del_bz<>"My_public" then
Response.Redirect ("index.asp")
end if
if del_bz="My_public" and Session("Urule")<>"a" and Session("Urule")<>"b" then
Response.Redirect ("index.asp")
end if
DataSource=Request.ServerVariables("li")
strconnstring = "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;
Password=sa;
Initial
Catalog=er;"
set my_Conn = Server.CreateObject("ADODB.Connection")
my_Conn.open strConnString
strSql="DELETE jhtdata where name='"&del_id&"'"
my_Conn.Execute (strSql)
my_Conn.Close
set my_Conn = nothing
Response.Redirect ("index.asp")
%>
为什么点击删除没有用?