问答详情
源自:4-5 实现信息批量删除

点击批量删除后没有反应是为何


list.jsp

<html xmlns="http://www.w3.org/1999/xhtml">
 <head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  <meta http-equiv="X-UA-Compatible"content="IE=9; IE=8; IE=7; IE=EDGE" />
  <title>内容列表页面</title>
  <link href="<%= basePath %>res/css/all.css" rel="stylesheet" type="text/css" />
  <script src="<%= basePath %>res/js/jquery-1.8.0.min.js">
  </script>
  <script src="<%= basePath %>res/js/list.js">
  </script>
    </head>
 <body style="background: #e1e9eb;">
  <form action="<%= basePath %>List.action" id="mainForm" method="post">
   <div class="right">
    <div class="current">当前位置:<a href="javascript:void(0)" style="color:#6E6E6E;">内容管理</a> &gt; 内容列表</div>
    <div class="rightCont">
     <p class="g_title fix">内容列表
      <a class="btn03" href="#">"新 增"</a>&nbsp;&nbsp;&nbsp;&nbsp;
      <a class="btn03" href="javascript:deleteBatch('<%= basePath %>');">删 除</a>
      </p>




list.js

function deleteBatch(basePath){
 $("#mainForm").Attr("action",basePath + "DeleteBatchServlet.action");
 $("#mainForm").submit();
}

提问者:拦路偏雨 2014-11-13 15:01

个回答

  • 源生活
    2014-11-14 21:37:13
    已采纳

    Jquery的方法你写错了:

    $("#mainForm").Attr("action",basePath + "DeleteBatchServlet.action");

    是attr,a是小写

  • 柒柒柒柒柒柒柒3382485
    2017-11-23 17:20:27

    解决方法:http://blog.csdn.net/c_p_h/article/details/56028424?utm_source=itdadao&utm_medium=referral