原码:
myxml.xml
<?xml version="1.0" encoding="utf-8"?>
<chxml title="我的XML">
<detail id="001"  hname="XML">
<con id="101" task="AA">    
<explain>内容提要
</explain>
</con>
<con id="102" task="BB">    
<explain>介绍内容
</explain>
</con>
</detail> 
</chxml>
myxsl.xsl
<?xml version="1.0" encoding="gb2312"?>
<xsl:stylesheet  xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:copyRight="http://xml.sz.luohuedu.net/"  version="1.0">
<xsl:variable name="cols" select="3"/>
<xsl:template match="chxml">
<xsl:apply-templates select="detail"/>
</xsl:template>
<xsl:template match="chxml/detail">
<div  id="content">
<xsl:apply-templates select="con"/>
</div>
</xsl:template>
<xsl:template match="chxml/detail/con">
<a href="XSL.htm"><xsl:value-of select="@task" /></a>
<xsl:apply-templates select="explain"/>
</xsl:template>
<xsl:template match="chxml/detail/con/explain">
<xsl:value-of select="."/>
</xsl:template>
</xsl:stylesheet>我想使人按不同的链接时,在XSL.htm中显示不同的内容,如:点击AA就只显示它下面的内容,点击BB也只显示它自己的内容.
我是新手,请各位能人帮帮忙,尽快.

解决方案 »

  1.   

    没有人能帮忙解决一下吗?我只是想点击不同的链接,内容显示在同一个页面.
    比如点击AA的时候,在页面上不显示BB的相关内容.
      

  2.   

    点一个链接时,对应层的DISPLAY熟悉设成BLOCK或者其他可见的,另一个层设成NONE,就实现点不同连接出现不同内容的效果
      

  3.   

    我有两个页,判断第一个XSL页中的某个链接是否被人点击过,并返回一个值,用这个值在另一个XSL页中进行判断,实现在同一个页面显示不同的内容!!!!
    请各位高人,讲解的细些,我刚刚接触这些东西好多不会谢谢!
      

  4.   

    原码:
    myxml.xml
    <?xml version="1.0" encoding="utf-8"?>
    <chxml title="我的XML">
    <detail id="001"  hname="XML">
    <con id="101" task="AA">    
    <explain>内容提要
    </explain>
    </con>
    <con id="102" task="BB">    
    <explain>介绍内容
    </explain>
    </con>
    </detail> 
    </chxml>
    myxsl.xsl
    <?xml version="1.0" encoding="gb2312"?>
    <xsl:stylesheet  xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:copyRight="http://xml.sz.luohuedu.net/"  version="1.0">
    <xsl:variable name="cols" select="3"/>
    <xsl:template match="chxml">
    <xsl:apply-templates select="detail"/>
    </xsl:template>
    <xsl:template match="chxml/detail">
    <div  id="content">
    <xsl:apply-templates select="con"/>
    </div>
    </xsl:template>
    <xsl:template match="chxml/detail/con">
    <a href="XSL.htm"><xsl:value-of select="@task" /></a>
    <xsl:apply-templates select="explain"/>
    </xsl:template>
    <xsl:template match="chxml/detail/con/explain">
    <xsl:value-of select="."/>
    </xsl:template>
    </xsl:stylesheet>我想使人按不同的链接时,在XSL.htm中显示不同的内容,如:点击AA就只显示它下面的内容,点击BB也只显示它自己的内容.
    我是新手,请各位能人帮帮忙,尽快.
      

  5.   

    从各个页面传个同一个参数过去,每个值不一样,如AA过去的传 ?flag="AA",BB过去的传 ?flag="BB",XSL.htm中取flag的值,如果是AA,就显示一种数据,如果
    是BB,显示BB的数据,XSL.htm显示的时候,用几个 div 包含不同的显示块,看需要显示那个就设对应的div 显示