<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="Manager_MenuPages_Jounery_Default" %> <!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 runat="server"> <title></title> </head> <body> <form id="form1" runat="server"> <script type="text/javascript" src="../../Js/jquery-1.4.1-vsdoc.js"></script> <script type="text/javascript" language="javascript"> $(function() { $("#tb tr").has("td").eq(0).find("img").click(function() { //调试程序 //debugger; //url 地址栏输入这个 javascript:alert($("#id").val()); 直接弹出指定值 var c = window.confirm("是否删除整个行程? "); if (c == true) { $(this).parent().parent("tr").siblings().andSelf().has('td').remove(); } }); }); </script> <div> <table id="tb" border="1"> <tr><th>我的地盘听我的</th></tr> <tr> <td>数据1</td> <td><img alt="" src="../../img/biao.gif"/></td> </tr><tr> <td>数据2</td> <td><img alt="" src="../../img/biao.gif"/></td> </tr> </table> </div> </form> </body> </html>