kristain

博客园 首页 新随笔 联系 订阅 管理

2011年8月26日 #

摘要: 如题代码document.write("<iframe id=\"frame1\" scrolling=no frameBorder=0 width=1050 height=700 src=\"http://www.cnblogs.com/dso.html\">");document.write("</iframe>");frame1.document.onreadystatechange=fnStartInit;function fnStartInit(){// alert(frame1. 阅读全文
posted @ 2011-08-26 17:13 kristain 阅读(3447) 评论(0) 推荐(0) 编辑

摘要: 本来要实现在页面中载入多个iframe,而iframe中的数据是从SQL查询的,恰好我的iframe是js循环排列的,因为js执行速度的原因,iframe不能显示,想要在js的循环中,每次执行都停留一段时间让每一个iframe都能加载完全,需要一个函数来停止js的页面元素加载。代码如下:function sleep(numberMillis) { var now = new Date(); var exitTime = now.getTime() + numberMillis; while (true) { now = new Date(); if (now.get... 阅读全文
posted @ 2011-08-26 17:08 kristain 阅读(3427) 评论(0) 推荐(0) 编辑