简单的增删改查页面

<%@ 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>

  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值