asp中弹出确认删除对话框的代码,急用!!!

来源:百度知道 编辑:UC知道 时间:2024/05/20 22:04:14
<tr>
<td width="82" height="18" bgcolor="#EBEEF3" valign="bottom">
<p align="center"><%=rs("id")%></p> </td>
<td width="266" height="18" bgcolor="#EBEEF3" valign="bottom"> <a href="viewnews.asp?id=<%=rs("id")%>"><% if len(rs("bt"))>20 then%><%=Left(rs("bt"),20)%>...<%else%><%=rs("bt")%><%end if%></a></td>
<td width="80" height="18" bgcolor="#EBEEF3" valign="bottom"><p align="center">[<%=rs("adddate")%>]</p></td>
<td width="56" height="18" bgcolor="#EBEEF3" valign="bottom">
<p align="center"><font color=

把这句
<a href="news.asp?del=<%=rs("id")%>"><font color="#000046">删除</font></a>
改成

<a href="javascript:if(confirm('确定删除?')){window.location='news.asp?del=<%=rs("id")%>';}"><font color="#000046">删除</font></a>

测试通过 满意就多给点分吧

confirm()

你是想点删除的时候弹出确认的话,代码是放在news.asp里面的del处理代码里,一般是JS代码来的。不是放在你贴出的代码里面