-- 作者:malaoping
-- 发布时间:9/13/2005 5:06:00 PM
-- 斑竹,能不能帮忙解决这个问题----
我要写一个js函数取出查询的数据; function GetFieldData()//我要在这里取出表头和数据; { // 1.xsl: for-each select ='' is only to select the node not the value of node ; // 2.xsl:value-of select = '' is to get the node's value; alert("table name is "); } ------- <input id="creatExcel" type="button" name="createExcel" value="createExcel" onclick="GetFieldData()"/> ------ 这是我查询数据展示; <table cellpadding="0" cellspacing="0" id="dataview"> <caption><spring:message code="query.bkqkbtable"/> </caption> <tr> <xsl:for-each select="/portal/portlet/other/form/listtitle/items/item">//这里是表头 <th> <xsl:value-of select="colnote"/> </th> </xsl:for-each> </tr> <xsl:for-each select="/portal/portlet/other/form/listdata/items/item">//这里是数据 <tr> <td><xsl:value-of select="dwmc"/> </td> //单位名称 <td><xsl:value-of select="bks"/> </td> //拨款数 <td><xsl:value-of select="tzdbh"/> </td> //指标号 <td><xsl:value-of select="bkrq"/> </td> //拨款日期 <td><xsl:value-of select="lymc"/> </td> //来源名称 <td><xsl:value-of select="yt"/> </td> 用途(摘要) </tr> </xsl:for-each> </table> 指点一二呢: 1.我用selectNodes()函数取不出 item/colnote 这个节点值; 2.我就更没办法去取它的value()值了;
|