在删除之后会停在这个页,如果一个页显示5条,那到,不会变成4条
<%
strPath=request.serverVariables("script_name")
currentAspFileFullName=lcase(mid(strPath,instrRev(strPath,"/")+1))
if request.ServerVariables("QUERY_STRING")<>"" then
  currentAspFileFullName=currentAspFileFullName&"?"&request.ServerVariables("QUERY_STRING")
end if

%>
<script type="text/javascript" src="../jquery.js"></script>
<script type="text/javascript">
function deldb(ids)
{  

  if(confirm("您确定要删除吗?"))
  {
  $.ajax({
    beforeSend:function(){$("#msg").html("正在发送");},
        type: "post",
        url:"ordersql.asp?del=order",
        data:"id="+ids,
        success: function(comm){
          alert(comm);
          $("#msg").html(comm);
          $("#tr"+ids).hide();
           $.get("<%=currentAspFileFullName%>",
           function(data){
            $("#myorder").html(data); ;
             }
          );  
        },
      error:function(err){
        $("#msg").html("出現錯誤:刪除失败");
        alert("出現錯誤:刪除失败");
        $("#tr"+ids).hide();
      }
    });
  }
  else
  {
    return
  }
}
</script>


作者:Else 's Blog
地址:http://www.aixq.com/post/975/
版权所有。转载时必须链接形式注明作者和原始出处及本声明!
最后编辑: Else 编辑于2008/03/28 09:07
代码 程序 编程 | 评论(2) | 引用(0) | 阅读(2763)
Else Email Homepage
2008/03/27 11:52
那个网址的问题不是存的js!
如果用js就可以放到.js的文件中,

在测试
Else Email Homepage
2008/03/27 11:54

<%
' order sql
if request.QueryString("del")="order" then
  Set MM_delCmd = Server.CreateObject ("ADODB.Command")
    MM_delCmd.ActiveConnection = MM_conn_STRING
    MM_delCmd.CommandText = "DELETE FROM dbo.order WHERE id = ?"
    MM_delCmd.Parameters.Append MM_delCmd.CreateParameter("param1", 5, 1, -1, Request.form("id")) ' adDouble
    MM_delCmd.Execute
    MM_delCmd.ActiveConnection.Close
  response.Write "删除成功"
end if
response.End()
%>

在加上ordersql.asp的源码
分页: 1/1 第一页 1 最后页
发表评论
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
昵称   密码   游客无需密码
网址   电邮   [注册]
               

验证码 不区分大小写