<html>
<head>
<script LANGUAGE="JavaScript">
bg = new Array(2); //设定图片数量,如果图片数为3,这个参数就设为2,依次类推
bg[0] = 'bg1.gif' //显示的图片路径,可用http://
bg[1] = 'bg2.gif'
bg[2] = 'bg3.gif'
index = Math.floor(Math.random() * bg.length);
document.write("<BODY BACKGROUND="+bg[index]+">");
</script>
</head>
<body>
</body>
</html>