📄 userlist.jsp
字号:
<%@ page pageEncoding="UTF-8" %>
<%@ include file="/include/shortheader.jsp"%>
<body>
<html:form action="LoginAction.do" method="post" styleId="frm">
<html:hidden property="dispatch" styleId="dispatch" value="listUser"/>
<html:hidden property="pageNo" styleId="pageNo"/>
<html:hidden property="userId" styleId="userId"/>
姓名:<html:text property="Q_USERNAME" styleId="Q_USERNAME" />
时间显示:<input type="text" name="date" onfocus="setday(this)">
<input type="submit" name="search" value="查询">
<input type="button" name="add" onclick="doAdd()" id="add" value="新增">
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="tablebox center alternating_row">
<tr class="boxtitle">
<td >用户ID</td>
<td>用户姓名</td>
<td>用户性别</td>
<td>用户地址</td>
<td>操作</td>
</tr>
<logic:present name="resultList">
<logic:iterate indexId="i" id="dataRow" name="resultList" >
<tr>
<td><bean:write name="dataRow" property="userId" /></td>
<td><bean:write name="dataRow" property="userName" /></td>
<td><bean:write name="dataRow" property="sex" /></td>
<td><bean:write name="dataRow" property="address" /></td>
<td><a href='javascript:doModify(<bean:write name="dataRow" property="userId" />)' >修改</a> <a href='javascript:doDel(<bean:write name="dataRow" property="userId" />)' >删除</a> </td>
</tr>
</logic:iterate>
</logic:present>
</table>
</html:form>
<div align="center"><pg:pg name="page"></pg:pg></div>
</body>
</html>
<!--
$(document).ready(function(){
$("#add").click(function(){
$("#dispatch").val("initEditTestuser");
$("#userId").val("");
$("#frm").submit();
});
});
-->
<script>
function doAdd(){
$("#dispatch").val("initEditTestuser");
$("#userId").val("");
$("#frm").submit();
}
function doModify(userId)
{
$("#dispatch").val("initEditTestuser");
$("#userId").val(userId);
$("#frm").submit();
}
function goPage(pageNo)
{
$("#pageNo").val(pageNo);
$("#frm").submit();
}
function doDel(userId)
{
$("#dispatch").val("deleteUser");
$("#userId").val(userId);
$("#frm").submit();
}
</script>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -