zoukankan      html  css  js  c++  java
  • js实现删除弹框确认

    JSP页面代码如下:

    <%@ page language="java" contentType="text/html; charset=UTF-8"%>
    <%@page import="java.util.List"%>
    <%@page import="com.ycy.blog.entity.Blog"%>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>无标题文档</title>
    <script type="text/javascript">
    function del() { var msg ="您真的确定要删除吗? 请确认!";
    if (confirm(msg)==true){ return true; }else{
    return false; } } </script>
    </head>
    <%
        List<Blog> list = (List<Blog>) request.getAttribute("blogs");
    %>
    <body>
        <div align="center">
            <p>博客文章管理</p>
            <table width="670" height="134" border="1" cellpadding="0"
                cellspacing="0">
                <tr>
                    <td width="51">文章号</td>
                    <td width="515">文章主题</td>
                    <td width="82">操作</td>
                </tr>
                <%
                    for (int i = 0; i < list.size(); i++) {
                        Blog blog = list.get(i);
                %>
                <tr>
                    <td><%=blog.getId()%></td>
                    <td><%=blog.getTitle()%></td>
                    <td><a
                        href="/blog/servlet/BeforeEditBlogServlet?id=<%=blog.getId()%>">修改</a>|
                        <a href="/blog/servlet/DeleteBlogServlet?id=<%=blog.getId()%>"
                        onclick="return del()">删除</a>
                    </td>
                </tr>
                <%
                    }
                %>
            </table>
            <p>&nbsp;</p>
        </div>
    </body>
    </html>

  • 相关阅读:
    【转】用户权限管理经典篇
    [转]提高精简框架集程序的性能
    迷你电话本
    Serial Communication via RS232 Port
    wxWidgets类列表(2.6.4)
    Parallel Port Programming (Part 2): with Visual C++
    [转]WINCE的编程忠告
    宽字符处理函数函数与普通函数对照表
    [转]C# 解析配置文件内容 System.Configuration
    Parallel Port Programming (Part 1): with C
  • 原文地址:https://www.cnblogs.com/yuanchaoyong/p/7007142.html
Copyright © 2011-2022 走看看