<%@ page language="java" contentType="text/html; charset=UTF-8"? ? pageEncoding="UTF-8"%>? ? <%@ taglib prefix="s" uri="/struts-tags"%><!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>????????????<script type="text/javascript" src="scripts/jquery-1.9.0.min.js"></script>????????????<script type="text/javascript">???????????????????????? $(document).ready(function(){????????????????????//點擊delete時,彈出確定要刪除xx的信息???????????????????? $(".delete").click( ? function(){???????????????????????????? var flag =confirm("確定要刪除信息 ?");???????????????????????????? if(flag){???????????????????????????????????????????????????????? }???????????????????????????? //取消超鏈接的默認行為???????????????????????????? return false;???????????????????????????? });???????????????????? })????????????</script></head><body> <h4>Employee List Page</h4> <s:if test="#request.employees ==null //#request.employees.size() == 0"> 沒有員工信息 </s:if> <s:else> <table border="1" cellpadding="10" cellspacing="0">???????????? <tr>???????????????????? <td>ID</td>???????????????????? <td>LASTNAME</td>???????????????????? <td>EMAIL</td>???????????????????? <td>BIRTH</td>???????????????????? <td>CREATETIME</td>???????????????????? <td>DEPT</td>???????????????????? <td>DELETE</td>???????????? </tr>???????????? <s:iterator value="#request.employees">???????????????????? <tr>???????????????????????? <td>${id}</td>???????????????????????? <td>${lastName}</td>???????????????????????? <td>${email}</td>???????????????????????? <td>${birth}</td>???????????????????????? <td>${createTime}</td>???????????????????????? <td>${department.departmentName}</td>???????????????????????? <td>???????????????????????? <a href="emp-delete?id=${id}" class="delete">Delete</a>???????????????????????? <input type="hidden" value="${lastName}">???????????????????????? </td>???????????? </tr>??????????</s:iterator> </table> </s:else> </body></html>
jquery不起作用,點擊delete時不彈出提示框,直接跳轉(zhuǎn)到刪除頁面
回到原點co
2017-05-07 00:35:49