<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>随机显示图片1</title>
</head><body>
<table width="100%"  border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td>
<script language="javascript">
var image=new Array(4)
image[0]="http://www.163.com";
image[1]="http://www.sohu.com";
image[2]="http://www.sina.com.cn";
image[3]="http://www.tom.com";
id=Math.floor(Math.random()*4);
imageurl=image[id];
alert(id)
document.write("<a href="+imageurl+">"+"<img src="+id+".gif>"+"</a>");
</script>
   </td>
  </tr>
</table>
  
</body>
</html>