分别a ,b 2个页面,如果 a 页面的<title>aa</title>,那么我在b页面里添加一个label 怎么获取a页面的title?

解决方案 »

  1.   

    传值过去。 有多种方法。 get  session cookie等
      

  2.   

    js:var tmpStr = "aa";
    var href = "<%= Url.Content("~/XXX/b.aspx?title=")%>" + tmpStr;
    window.location.href = href;
      

  3.   

    a页面:
    html:<input type="button" id="btn" value="去B页面" onclick="goToB();">js:
    <script type="text/javascript">
    function goToB()
    {
    var tmpStr = "aa";
    var href = "<%= Url.Content("~/XXX/b.aspx?title=")%>" + tmpStr;
    window.location.href = href;
    }</script>
      

  4.   

    b页面:
    <label><%= Request.Param("title")%></label>