javascript写动态分页导航,该怎么样写?谁知道帮帮我 改变iframe的src属性实现页面跳转,父窗的文字改变就更简单了,直接改innerHTML 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 听不太明白,如果iframe只是获取父窗体的参数可以alert(parent.location.search.replace(/\?\w+?\=/,"")试试或者alert(xx)xx是你服务器传的参数 <div id="pageFrame" ><a href='x.php?page=2' target='baiduFrame' onclick='checkFramePageState(2)'>2</a></div><script>function checkFramePageState(pagex){//.....这里写上根据pagex来改变pageFrame内容的代码。赋予tmpstrvar url='x.php?page=';................document.pageFrame.innerHTML = tmpstr;}</script> 这样吧,不明白的,大家请看http://www.xitek.com/livebroadcast/lbc.php?livebroadcastid=1这个页面,下面就有分页导航条.假如明白我说是什么意思,请大家帮我出主义吧.谢谢了! 这样吧,不明白的,大家请看http://www.xitek.com/livebroadcast/lbc.php?livebroadcastid=2这个页面,下面就有分页导航条.假如明白我说是什么意思,请大家帮我出主义吧.谢谢了! <!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内容的代码。赋予tmpstrvar 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> 请问高手,关于web前台开发和后台开发的问题 模拟登录 提交不上帐号 密码就可以 请大神们帮解决一下 问大家一个关于smarty section/foreach很菜的问题!! 请教 如何将转义字符存入数据库。 如何在web页中实现树形层次目录复选框 关于繁體中文輸出圖片的奇怪問題,大家幫忙看看,謝謝! 很简单,每个写过php的人应该都知道!求可用代码! 又有cookie的问题 新上路学php+mysql,请高手带路 Linux如何自定义PHP扩展, C++ 编写的源码 大家来讨论下php登录hotmail后,获得联系人名单. 怎么计算数组中的元素个数!急!!
可以alert(parent.location.search.replace(/\?\w+?\=/,"")
试试
或者alert(xx)
xx是你服务器传的参数
<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>
<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>