日期:2014-05-16  浏览次数:20438 次

ajax删除 大虾看下问题在哪
本帖最后由 u013177533 于 2014-01-14 17:34:30 编辑
函数不执行 大虾看看那错了 调试到不了handler
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <script src="../js/jquery-1.7.1.min.js"></script>
    <script type="text/javascript">
        $(function () {
            $('.delete').click(function () {
                var comm = $(this).parent().parent();
                var did = comm.attr("id");
                $.ajax({
                    type: "POST",
                    url: "Salaryajax/Salaryhandler.ashx?action=dl",
                    data: "&id=" + escape(did),
                    async: true,
                    cache: false,
                    success: function (msg) {
                        if (msg == "success") {
                           comm.remove();
                        }
                    }
                });
            });
        });
    </script>
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
       <table>
           <thead>
             <tr>
                 <td>salaryid</td>
                 <td>name</td>
                 <td>salary</td>
                 <td>createtime</td>