點擊批量刪除后沒有反應是為何
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> > 內容列表</div>
????<div class="rightCont">
?????<p class="g_title fix">內容列表
????? <a class="btn03" href="#">"新 增"</a>
????? <a class="btn03" href="javascript:deleteBatch('<%= basePath %>');">刪 除</a>
????? </p>
list.js
function deleteBatch(basePath){
?$("#mainForm").Attr("action",basePath + "DeleteBatchServlet.action");
?$("#mainForm").submit();
}
2014-11-14
Jquery的方法你寫錯了:
$("#mainForm").Attr("action",basePath + "DeleteBatchServlet.action");
是attr,a是小寫
2017-11-23
解決方法:http://blog.csdn.net/c_p_h/article/details/56028424?utm_source=itdadao&utm_medium=referral