B页面没有 但是B页面需要A页面传递过去的那个值。该怎么做啊?

解决方案 »

  1.   

    ⊙﹏⊙b汗,你的a和b要有关系才行啊。。什么关系你这2个页面,没有关系只能从a提交至到b去了
      

  2.   

    那你就在你的B页面onclick时候window.opener.mytest()之后在你的A页面里边写一个mytest函数
    function mytest(){
    return $('#select2').val()
    }
      

  3.   

    A页面选择 然后有个弹出框出来B页面b可以用opener得到a的引用。<input type="button" value="123" onclick="alert(opener.$('#select2').val())"> 本地测试不要用webkit核心的,如chrome,未发布不能互相访问。chrome浏览器iframe parent.document为undefined
      

  4.   

    A页面选择 然后有个弹出框出来B页面b可以用opener得到a的引用。<input type="button" value="123" onclick="alert(opener.$('#select2').val())"> 本地测试不要用webkit核心的,如chrome,未发布不能互相访问。chrome浏览器iframe parent.document为undefinedopener未定义
      

  5.   

    A页面选择 然后有个弹出框出来B页面b可以用opener得到a的引用。<input type="button" value="123" onclick="alert(opener.$('#select2').val())"> 本地测试不要用webkit核心的,如chrome,未发布不能互相访问。chrome浏览器iframe parent.document为undefined我的上一个页面是这么跳转的 top.popUpIFrameLayer(getMyUrl, "标题");
      

  6.   

    在a页面转至b页面时候,把$('#select2').val())"的值带到b页面,之后再取出就ok了。
      

  7.   

    要不你就放request里面传过去呗
      

  8.   

    popUpIFrameLayer是你自己写的方法吧。。自己看这篇文章理清楚关系来。。iframe和父页,window.open打开页面之间的引用关系
      

  9.   


    top.自定义名称  这样跟opener一样用吗?
      

  10.   

    通过window.open打开的页面,被打开的页面通过opener得到打开这个页面的引用文章里面不是说了,top/parent是iframe和frameset用,top是最顶层的页面,自己认真看文章说明
      

  11.   


    我的A页面是 top.自定义(url,"标题") 的方式。我在A页面写了你说的那个方法。B页面怎么调用?
      

  12.   

    B页面里随便写个方法function getselval(){
    alert(window.opener.mytest());
    }在你b页面需要onclick的时候调用getselval函数看看alert出来是不是你需要的值
      

  13.   

    A页面<script>
    var qu
    function mytest(){
    qu = document.getElementById('select2').value;
    return qu;
    }

    function myloc(){
    alert(qu)
    window.open("b.html#"+qu)
    }

    </script>
    <select id="select2" multiple='multiple'> 
             <option value='1'>1</option> 
             <option value='2'>2</option> 
    </select> 
    <input type="button" value="123" onclick="mytest();"> 
    <input type="button" value="12322" onclick="myloc();"> 
      

  14.   

    B页面
    <script>
    function mytest1(){
    var aa=window.location.href.split('#');
    alert(aa[1])
    }


    </script>
    <select id="select2" multiple='multiple'> 
             <option value='1'>1</option> 
             <option value='2'>2</option> 
    </select> 
    <input type="button" value="123" onclick="mytest1();">