以文本方式查看主题

-  中文XML论坛 - 专业的XML技术讨论区  (http://bbs.xml.org.cn/index.asp)
--  『 XML源码及示例(仅原创和转载) 』  (http://bbs.xml.org.cn/list.asp?boardid=32)
----  斑竹,能不能帮忙解决这个问题----  (http://bbs.xml.org.cn/dispbbs.asp?boardid=32&rootid=&id=22194)


--  作者: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()值了;

     


W 3 C h i n a ( since 2003 ) 旗 下 站 点
苏ICP备05006046号《全国人大常委会关于维护互联网安全的决定》《计算机信息网络国际联网安全保护管理办法》
78.125ms