zoukankan      html  css  js  c++  java
  • jsp页面样例及解析

    
    <%@ page language="java" contentType="text/html; charset=UTF-8"
        pageEncoding="UTF-8"%>
    <% String path =request.getContextPath();%>
    <%@ taglib prefix="display" uri="http://displaytag.sf.net/el" %>
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %><El标签核心库>
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>Insert title here</title>
    
    <link href="css/displaytag.css" rel="stylesheet">
    <script type="text/javascript" src="jquery-1.10.2.min.js">
    </script>
    <script type="text/javascript">
    $(function(){
    	$(".delete").click(function(){
    	 var href = $(this).attr("href")
    	 $("form").attr("action",href).submit()
    	 return false;
    	});
    	
    })
    </script>
    </head>
    <body>
    	
    	<form action="" method="post">
    		<input type="hidden" name="_method" value="DELETE">
    	</form>
    	
    <display:table name="users" cellspacing="0" style="list" pagesize="3"   cellpadding="0" defaultsort="1">
    <display:column property="id" title="ID" class="idcol" />
    <display:column property="name" url="/user"  paramId="id" paramProperty="id"/>
    <display:column property="password" autolink="true"/>
    <display:column property="birthday" title="Comments"/>
    </display:table>
    	
    	
    	
    	<table border="1">
    	<c:if test="${empty requestScope.users }">没有任何员工信息</c:if>
    	<c:if test="${!empty requestScope.users }">
    	<c:forEach items="${users}" var="u">
    		<tr>
    		<td>${u.id}</td>
    		<td>${u.name}</td>
    		<td>${u.password}</td>
    		<td>${u.birthday}</td>
    		<td><a href="user/${u.id }">编辑</a></td>
    		<td><a class="delete" href="user/${u.id }">删除</a></td>
    		</tr>
    	</c:forEach>
    	</c:if>
    	</table>
    	
    	
    	
    </body>
    </html>
    
  • 相关阅读:
    Vue3源码系列之触发更新的实现
    Vue3源码系列之依赖收集的实现
    Vue3源码系列之reactiveApi实现
    删除链表的倒数第n个节点
    Shared_ptr 参考实现
    linux 目录结构 比较老
    C++11 bind function
    状态机DP
    尾递归
    秒杀系统的构建(2)
  • 原文地址:https://www.cnblogs.com/gjmfg/p/5523009.html
Copyright © 2011-2022 走看看