当我处于 td 级别时,如何从 xsl html table 行中提取数据?

How can I extract data from an xsl html table row when I am at the td level?

我在 xsl sheet 中有一个 table,我正在使用 ajax 调用它。用户需要单击数据网格上的字段 (td) 并运行单击事件。在该点击事件中,我需要提取该行中其他字段的数据。

下面,我的逻辑有alert($(this).parents("tr").attr("id","c3").value());。为什么这会拉取该行的所有数据,我如何才能只拉取 c3 字段?

 $("#List td").click(function(){

 //alert($(this).parents("tr").html());
 alert($(this).parents("tr").attr("id","wc").value());

 )};
    <?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
 xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:java="http://xml.apache.org/xslt/java"
 exclude-result-prefixes="java">
 <xsl:output method="html" media-type="text/html" encoding="UTF-8" />
 <xsl:param name="HeaderText"/>
 <xsl:param name="FooterText"/>
 <xsl:template match="/">

 <table id="List">
  <thead>
    <tr>
     <th> DATE_TIME</th>
     <th> COL2</th>
     <th> COL3</th>
     <th> COL4</th>
     <th> COL5</th>
     <th> COL6</th>
     <th> COL7</th>
    </tr>
  </thead>
  <tbody>
      <xsl:for-each select="/Rowsets/Rowset/Row">
      <tr>
          <xsl:attribute name="column-two"> <xsl:value-of select="COLUMN_TWO"/> </xsl:attribute>
       <xsl:attribute name="column-three"> <xsl:value-of select="COLUMN_THREE"/> </xsl:attribute>
       <xsl:attribute name="column-five"> <xsl:value-of select="COLUMN_FIVE"/> </xsl:attribute> 
       <td align="center"> <xsl:value-of select="java:...ext.ExtFunctions.dateFromXMLFormat(DATE_TIME,$DateFormat)"/></td>
       <td id="c2" align="center"> <xsl:value-of select="COLUMN_TWO"/> </td>
       <td id="c3" align="center"> <xsl:value-of select="COLUMN_THREE" /> </td>
       <td id="c4" align="center"> <xsl:value-of select="COLUMN_FOUR"/> </td>
       <td id="c5" align="center"> <xsl:value-of select="COLUMN_FIVE"/> </td>
       <td id="c6" align="center"> <xsl:value-of select="COLUMN_SIX"/></td>
       <td id="c7" align="center"> <xsl:value-of select="COLUMN_SEVEN"/></td>
   </tr>

   </xsl:for-each>
  </tbody>
 </table>

<script>



</script>
</xsl:template>
</xsl:stylesheet>

我觉得

$("#List td").click(function(){
    alert($(this).parents("tr").attr("id","wc").value());    
)};

应该改为

$("#List td").click(function(){
    alert($(this).parents("tr").attr("id","c3").value());    
)};