asp教程 删除数据库教程记录入门教程
<script>
function check()
{
if(confirm(确认删除))
{
//操作
}
}
</script>
<table width="" border="">
<tr>
<td width="">a</td>
<td width="">b</td>
</tr>
<tr>
<td>wwwliannet </td>
<td><a href="?id=" onClick="check();">删除</a></td>
</tr>
</table>
<?
//asp 删除数据库记录入门教程
SiteDb ="Database/mdbmdb"
Set Conn = ServerCreateObject("AdodbConnection")
ConnStr="Provider=MicrosoftJetOLEDB;Data Source=" & ServerMapPath(SiteDB)
ConnOpen ConnStr
Set Rs=ServerCreateobject("AdodbRecordSet")
Dim sql
sql ="delete from test where id="&requestquery("id")
if rsexecute( sql ) then
responsewrite("删除成功")
else
responsewrite("删除失败")
end if