Chinaunix首页 | 论坛 | 博客
  • 博客访问: 555886
  • 博文数量: 34
  • 博客积分: 10171
  • 博客等级: 上将
  • 技术积分: 1365
  • 用 户 组: 普通用户
  • 注册时间: 2004-11-09 13:13
文章分类

全部博文(34)

文章存档

2011年(1)

2009年(20)

2008年(13)

我的朋友

分类:

2008-09-03 13:38:44

<script language="JavaScript">

function selectFrom(iFirstValue,iLastValue){
    var iChoces = Math.abs(iLastValue - iFirstValue) + 1;
    return Math.floor(Math.random() * iChoces + iFirstValue);
}
var iNum = selectFrom(1,100);


  function doSearch(){
     var iNum = selectFrom(1,100);
     parent.iframe1.location="http://digico.cublog.cn/stpage/"+iNum+".html";

     //点击后的刷新 
  }
</script>
<a onclick="doSearch();">刷新</a>

  

<iframe name="iframe1" src="http://digico.cublog.cn/stpage/1.html" scrolling='no' frameborder='0' allowtransparency='true' width=118% height=180></iframe>

<script language="javascript">
document.frames[0].location.href="http://digico.cublog.cn/stpage/"+iNum+".html";

//页面正常刷新后,赋于iframe src 的值
  </script>
 

阅读(2037) | 评论(0) | 转发(0) |
0

上一篇:随机产生区间号

下一篇:PHP安装心得

给主人留下些什么吧!~~