<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<style>body{margin:0;padding:0;}</style>
<script type="text/javascript">
//取随机数,给一个取值范围
function GetRandom(number)
{
return parseInt(Math.random()*number+1);
} function TEST(number)
{
var randnumber= GetRandom(number).toString();
switch(randnumber)
{
case "1":
document.getElementById("pp").src="top.js";
break;
case "2":
document.getElementById("pp").src="forum-top.js";
break;
case "3":
document.getElementById("pp").src="post-end.js";
break;
}
setTimeout('TEST(3)',2)
} </script></head><body onload="setTimeout('TEST(3)',2);"><script id="pp"></script></body>
</html>
改成图片试了一下是通过的 至于这个js的话 就不知道行不行了
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<style>body{margin:0;padding:0;}</style>
<script type="text/javascript">
//取随机数,给一个取值范围
function GetRandom(number)
{
return parseInt(Math.random()*number+1);
} function TEST(number)
{
var randnumber= GetRandom(number).toString();
switch(randnumber)
{
case "1":
document.getElementById("pp").src="top.js";
break;
case "2":
document.getElementById("pp").src="forum-top.js";
break;
case "3":
document.getElementById("pp").src="post-end.js";
break;
}
setTimeout('TEST(3)',2)
} </script></head><body onload="setTimeout('TEST(3)',2);"><script id="pp"></script></body>
</html>
改成图片试了一下是通过的 至于这个js的话 就不知道行不行了
setTimeout('TEST(3)',2);改成setTimeout('TEST(3)',3000);
2个地方都要改一下。