<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>My JSP 'index.jsp' starting page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<link rel="stylesheet" href="conf/themes/default/easyui.css" type="text/css" media="screen" />
<link rel="stylesheet" href="conf/themes/icon.css" type="text/css" media="screen" />
<script src="conf/js/jquery-1.3.2.min.js"></script>
<script src="conf/js/jquery.easyui.min.js"></script>
<script src="conf/js/easyui-lang-zh_CN.js"></script>
<SCRIPT type="text/javascript">
$(function(){
//全选与全不选
$("#ckall").click(function()
{
$("[name=ck]:checkbox").attr("checked",this.checked);
});
var objs=$("[name=ck]:checkbox");
//当一个个的全部选中的时候 全选的按钮也是需要选中的
objs.click(function(){
$("#ckall").attr("checked",objs.length==objs.filter(":checked").length);
});
//批量删除
$("#largeDel").click(function () {
var str = "";
$.each($("input[type='checkbox'][id!=all]"), function (k, v) {
if (v.checked == false)
{
return;
}
else
{
str += v.value + ",";
}
});
if (str == "")
{
alert("请选中一项");
return;
}
else if (confirm("确认删除吗?"))
{
str = str.substring(0, str.length - 1);
alert(str);
// window.location.href = "ideLogin.action?ids=" + str;
}
});
});
</SCRIPT>
</head>
<body>
<button id="largeDel">删除</button>
<P>
<input type="checkbox" id="ckall" value="all"/>全选</P><P>
<input type="checkbox" name="ck" value="0"/>男</P><P>
<input type="checkbox" name="ck" value="1"/>女</P><P>
<input type="checkbox" name="ck" value="00"/>百合</P><P>
<input type="checkbox" name="ck" value="11"/>基友</P>
<s:checkbox name="ck" value="false" fieldValue="1111">通吃</s:checkbox>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
This is my JSP page.fffffffffffffffffffffffffffffff <br>
====================循环request中的list对象(super.getRequest().setAttribute("listUsers",getAllListUsers );)==========================
<br>
<s:iterator value="#request.listUsers" status="s" id="key">
<s:property value="userName"/>
<s:property value="passwd"/>
</s:iterator>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
======================LoginAction中的listMap是属性循环出里面的对象=====================================
<br>
<s:iterator value="listMap" status="s" id="list">
属性listMap中 key = <s:property value="key"/>
下面是属性listMap中 value(但是每一个Value是一个List对象 List 对象中放置的LoginBean 对象) =
<s:property value="value"/>
<s:iterator value="value" status="s" id="key">
<s:property value="userName"/>
<s:property value="passwd"/>
</s:iterator>
</s:iterator>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
==================循环request中requestListMap的对象(super.getRequest().setAttribute("requestListMap",LoginService.getAllUsers() );)============================================
<br>
<s:iterator value="#request.requestListMap.keySet()" id="key">
<s:property value="key"/>
<s:iterator value="#request.requestListMap.get(#key)" id="loginBean" status="loginBean_stat">
<tr >
<s:if test="#cust_stat.odd == true">odd</s:if><s:else>even</s:else>
<td><s:property value="userName"/> </td>
<td><s:property value="passwd"/> </td>
</tr>
</s:iterator>
</s:iterator>
</body>
</html>
jquery批量删除
猜你喜欢
转载自xinyoulinglei.iteye.com/blog/1682220
今日推荐
周排行