<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<%
String path = request.getContextPath();
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=7" />
<title>用户管理</title>
<link href="<%=path%>/css/main.css" rel="stylesheet" type="text/css" media="all" />
<script src="<%=path%>/js/jquery-1.4.2.min.js" type="text/javascript"></script>
<script type="text/javascript" src="<%=path%>/js/datePicker/calenderJS.js"></script>
</head>
<script type="text/javascript">
/**
* 根据条件检索合同信息
*/
function queryUsers() {
document.forms[0].submit();
}
/**
* 根据ID调用server修改查询方法
*/
function editUser(id) {
var form = document.forms[1];
form.id.value = id;
form.submit();
}
/**
* 根据ID调用server删除方法
*/
function delUser(id) {
var flag = window.confirm('您确认要删除此用户吗?');
if(!flag){
return;
}
var form = document.forms[1];
form.action="<%=path%>/car!deleteCarById.action";
form.id.value = id;
form.submit();
}
<%-- function queryPrivilege(id){
var form = document.forms[1];
form.id.value = id;
form.action = "<%=path%>/user!queryPrivilegeByUserId.action"
form.submit();
} --%>
</script>
<body class="content-pages-body">
<%-- <s:debug></s:debug>--%>
<div class="content-pages-wrap">
<div class="commonTitle">
<h2>
>> 用户信息
</h2>
</div>
<form id="form-search" name="fm" action="<%=path%>/car!query.action"
method="post">
<table width="100%" border="0" cellspacing="0" cellpadding="0"
class="commonTableSearch">
<tr>
<th align="right">
生日:
</th>
<td colspan="3">
<input name="conDate" type="text" class="inputTextNormal"
οnfοcus="HS_setDate(this);" />
</td>
<th align="right">
登录名:
</th>
<td colspan="3">
<input type="text" class="inputTextNormal" name="user.loginname" />
</td>
<td>
<a href="javascript:queryUsers();" title="检索" class="btnNormal">检索</a>
</td>
</tr>
</table>
</form>
<!--//commonTableSearch-->
<div class="btnBar">
<ul class="clearfix">
<li>
<a href="<%=path %>/page/savecar.jsp" title="添加用户"
class="btnNormal">ADD</a>
</li>
</ul>
</div>
<form action="<%=path%>/car!queryCarById.action" method="post">
<input type="hidden" name="id">
<table border="0" cellspacing="1" cellpadding="0"
class="commonTable">
<tr>
<th>序号</th>
<th>品牌</th>
<th>车牌号</th>
<th width="7%">操作</th>
</tr>
<s:iterator value="carList" var="car" status="index">
<tr>
<td>${index.count }</td>
<td>
<a href="#"><s:property value="carName"/></a>
</td>
<td>
<a href="#"><s:property value="carNo"/></a>
</td>
<td>
<a href="javascript:editUser(<s:property value="id"/>)" class="btnIconEdit"
title="修改"></a>
<a href="javascript:delUser(<s:property value="id"/>)" class="btnIconDel"
title="删除"></a>
</td>
</tr>
</s:iterator>
</table>
</form>
</div>
</body>
</html>
简单的增删改查页面
最新推荐文章于 2024-07-21 18:42:33 发布