今天刚学习到display标签,用到display:table ,但想在生产的表格后面加一列,用来对所在行进行编辑或删除操作。
有了解相关知识的朋友,麻烦说一下,谢谢了。(本人菜鸟,分少,不要介意,#_+!)
------解决方案--------------------
当然可以啦
<display:column titleKey="操作">
<input type="button" onclick="edit()" value="编辑"/>
<input type="button" onclick="delete()" value="删除"/>
</display:column>
------解决方案--------------------
给你个例子,注意最后三列 删除 修改 和新增 注意设置 media="html" 属性
- HTML code
<displsy:table name="airelinesList" id="item" export="true" sort="list" pagesize="20" class="its" requestURI="${requestFullURL}"> <displsy:column title="序号">${item_rowNum + (page - 1) * pageSize}</displsy:column> <displsy:column title="航空公司名称" property="name" sortable="true" headerClass="sortable" /> <displsy:column title="二字代码" property="code" sortable="true" headerClass="sortable" /> <displsy:column title="电话" property="telephone" sortable="true" headerClass="sortable" /> <displsy:column title="传真" property="fax" sortable="true" headerClass="sortable" /> <displsy:column title="电话" property="mobile" sortable="true" headerClass="sortable" /> <displsy:column title="联系人" property="contact" sortable="true" headerClass="sortable" /> <displsy:column title="电子邮件" property="email" sortable="true" headerClass="sortable" /> <displsy:column title="删除" media="html" style="width: 30px;"> <img src="<%=basePath%>image/delete.png" alt="删除" onclick="javascript:if(confirm('您确认要删除该信息项么?'))window.location='<%=basePath%>basicinformation/deleteAirelines.action?id=${item.id}'" style="cursor: pointer" /> </displsy:column> <displsy:column title="修改" media="html" style="width: 30px;"> <img src="<%=basePath%>image/edit.png" alt="修改" onclick="window.location='<%=basePath%>basicinformation/editAirelines.action?id=${item.id}'" style="cursor: pointer" /> </displsy:column> <displsy:column title="航班" media="html" style="width: 30px;"> <img src="<%=basePath%>image/b_new1.png" alt="新增航班" onclick="window.location='<%=basePath%>basicinformation/editFlights.action?airelinesId=${item.id}'" style="cursor: pointer" /> </displsy:column> </displsy:table>