EasyL@_@K
<body>
<a href='#' onclick='comfirmDeleteUser(<%=rs.getString("UserID")%>)'>删除用户</a>
<script type="text/javascript">
<!--
function comfirmDeleteUser(strUserId)
{
if (confirm("确认删除所选用户?"))
{
var currentPath = window.location.href.substring(0, window.location.href.lastIndexOf("/")+1);
window.location.href = currentPath + "DeleteUser.jsp?UserID=" + strUserId;
}
}
//-->
</script>
</body>
<body>
<a href='#' onclick='comfirmDeleteUser(<%=rs.getString("UserID")%>)'>删除用户</a>
<script type="text/javascript">
<!--
function comfirmDeleteUser(strUserId)
{
if (confirm("确认删除所选用户?"))
{
var currentPath = window.location.href.substring(0, window.location.href.lastIndexOf("/")+1);
window.location.href = currentPath + "DeleteUser.jsp?UserID=" + strUserId;
}
}
//-->
</script>
</body>
你直接链接出去当然没办法控制啦!
和楼上的朋友的思路一样,不要直接链接出去,用onclick等javascript事件来完成确认提交!
confirm(“”)当仁不让!!