日期:2014-05-18 浏览次数:20505 次
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="_20120301_Default2" %> <!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> <script src="../jquery-1.3.2-vsdoc.js" type="text/javascript"></script> <script type="text/javascript"> $(function(){ $("#tb").find("td").each(function(){ var tdCol = $(this).attr("colspan"); var tdRow = $(this).attr("rowspan"); alert("colspan:" + tdCol + "________ rowspan:" + tdRow); }); }); </script> </head> <body> <form id="form1" runat="server"> <div> <table id="tb" border="1"> <tr> <td colspan="2"> </td> <td> </td> </tr> <tr> <td rowspan="2"> </td> <td> </td> <td> </td> </tr> <tr> <td> </td> <td> </td> </tr> </table> </div> </form> </body> </html>