改变iframe的src属性实现页面跳转,父窗的文字改变就更简单了,直接改innerHTML

解决方案 »

  1.   

    听不太明白,如果iframe只是获取父窗体的参数
    可以alert(parent.location.search.replace(/\?\w+?\=/,"")
    试试
    或者alert(xx)
    xx是你服务器传的参数
      

  2.   

    <div id="pageFrame" >
    <a href='x.php?page=2' target='baiduFrame' onclick='checkFramePageState(2)'>2</a>
    </div><script>
    function checkFramePageState(pagex){
    //.....这里写上根据pagex来改变pageFrame内容的代码。赋予tmpstr
    var url='x.php?page=';
    ................
    document.pageFrame.innerHTML = tmpstr;
    }
    </script>
      

  3.   

    这样吧,不明白的,大家请看http://www.xitek.com/livebroadcast/lbc.php?livebroadcastid=1这个页面,下面就有分页导航条.假如明白我说是什么意思,请大家帮我出主义吧.谢谢了!
      

  4.   

    这样吧,不明白的,大家请看http://www.xitek.com/livebroadcast/lbc.php?livebroadcastid=2这个页面,下面就有分页导航条.假如明白我说是什么意思,请大家帮我出主义吧.谢谢了!
      

  5.   

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <html>
    <head>
    <title> New </title>
    <meta name="Generator" content="Editplus">
    <meta name="Author" content="bailing">
    <meta name="Keywords" content="">
    <meta name="Description" content="">
    <style>
    *{font:12px verdana;}
    </style>
    <meta http-equiv="Content-Type" content="text/html; charset=gbk" />
    </head><body>
    <div id="pageFrame" ><a href='#'  onclick='checkFramePageState(10,10)'>10</a>
    </div>
    <iframe name="baiduFrame" width=420 height=330 frameborder=1 scrolling=auto src="#"></iframe><script>
    function checkFramePageState(pagex ,maxpage){
    //.....这里写上根据pagex来改变pageFrame内容的代码。赋予tmpstr
    var urls='http://www.baidu.com/?page=';
    var tmpstr = '';
    var frameContainer = document.getElementById('pageFrame');
    var newurl = urls+pagex;document.frames['baiduFrame'].location=newurl;if(pagex>=maxpage)
    {
    for(i=pagex,n=pagex+10;i<=n;i++){
    tmpstr +="<a href='# ' onclick='checkFramePageState("+i+","+n+")'>第"+i+"页</a>\n";
    }
    frameContainer.innerHTML = tmpstr;
    }
    //alert(tmpstr);
    }</script></body>
    </html>