我有两个页,判断第一个XSL页中的某个链接是否被人点击过,并返回一个值,用这个值在另一个XSL页中进行判断,来显示不同的页面!!!!

解决方案 »

  1.   

    点击事件里存储一个值到Hidden field,转到另一个页判断即可
      

  2.   

    cookie里点一个存一个,下一页读出来就行
      

  3.   

    本人对javascript是新手,麻烦各位能不能说得明白些,实在不好意思!
      

  4.   

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <html>
    <head>
    <title> New Document </title>
    <meta name="Generator" content="EditPlus">
    <meta name="Author" content="zourinet">
    <meta name="Keywords" content="">
    <meta name="Description" content="">
    </head><body>
    <script language="JavaScript">
    <!--
    function Cookies()
    {
    this.name;
    this.path="/";
    expires=new Date();
    expires.setTime(expires.getTime()+(86400*365));
    this.expires = expires.toGMTString();
    }
    Cookies.prototype.SetCookie=function (name,value)
    {
    document.cookie=name+"="+value+"; expires="+this.expires+"; path="+this.path+"";
    }
    Cookies.prototype.getCookie=function (Name)
    {
       var search = Name + "=";
       if (document.cookie.length > 0)
       { // if there are any cookies
          offset = document.cookie.indexOf(search) 
          if (offset != -1)
      { // if cookie exists 
             offset += search.length ;
             end = document.cookie.indexOf(";", offset) 
             if (end == -1) 
                end = document.cookie.length;
             return (unescape(document.cookie.substring(offset, end)));
          } 
       }
       return 0;
    }//未完等等[20070825]
    Cookies.prototype.getCookieDic=function(vparent,vchildren)
    {
    var strchildren =  this.getCookie(vparent);
    strchildren = strchildren.getQuery(vchildren);
    return (strchildren);////20070827 完成
    }
    String.prototype.getQuery = function(name)
    {
      var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
      var r = this.substr(this.indexOf("\?")+1).match(reg);
      if (r!=null) return unescape(r[2]); return null;
    }
    var c = new Cookies();
    c.SetCookie("clickclass","isclick=true&numclick=100");
    alert(c.getCookieDic("clickclass","isclick"));
    //-->
    </script>
    </body>
    </html>
    存cookies吧.
      

  5.   

    原码:
    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也只显示它自己的内容.
    我是新手,请各位能人帮帮忙,尽快.