<script language="javascript">
if (confirm("你确信要删除该记录吗?"))
{
alert("将删除纪录!");
}
else
{
alert("你已经决定刀下留情了!");
}
</script>这样并没有错啊。
if (confirm("你确信要删除该记录吗?"))
{
alert("将删除纪录!");
}
else
{
alert("你已经决定刀下留情了!");
}
</script>这样并没有错啊。
if (confirm("你确信要删除该记录吗?"))
{
<%
str="delete from hos_dptattribute where dptattributeid='" &request("id")&"'"
conn.execute str
%>
return true ;
} else {
return false ;
}
</script>试试看吧,不知道行不行。
只要我一调用到删除记录的脚本,他就不判断是TRUE还是FALSE
都删除了!
帮帮忙,我实在没办法!不知该如何做了!
if (confirm("你确信要删除该记录吗?"))
{
window.location.href='delete.jsp?id=<%=request("id")%>';
}
else
{
alert("你已经决定刀下留情了!");
}
</script>
在delete.jsp中写删除的代码。因为服务端代码是先于客户端confirm运行的,所以无论怎么选,删除已经执行了
/===========================
<%
str="delete from hos_dptattribute where dptattributeid='" &request("id")&"'"
conn.execute str
response.write "成功删除!3秒钟窗笨关闭"
response.write "<script>setTimeout('window.close()',3000)</script>"
%>
<script language="javascript" >
if (confirm("你确信要删除该记录吗?"))
{
window.open('delete.asp','',"width=200,height=150")
}
</script>
str="delete from hos_dptattribute where dptattributeid='" &request("id")&"'"
conn.execute str
response.write "成功删除!3秒钟窗笨关闭"
response.write "<script>setTimeout('window.close()',3000)</script>"
%>
//==================提交文件===============
<script language="javascript" >
if (confirm("你确信要删除该记录吗?"))
{
window.open('delete.asp','',"width=200,height=150")
}
</script>
告诉一种用隐藏iframe执行*.asp程序的方法:<iframe id=myIframe width=0 height=0></iframe> //隐藏的iframe<script language="javascript">
if (confirm("你确信要删除该记录吗?"))
{
myIframe.location.href = "edit.asp?action=del&id=1"
}
</script>
edit.asp
------------------------------------------
<%
.......
if request("action") = "del" then
str="delete from hos_dptattribute where dptattributeid='" &request("id")&"'"
conn.execute str
end if
%>
原来是服务端代码优先权大于客户端代码。I see.