谢谢行者不厌其烦的指教,你一定是计算机专业的大学生或教师吧。
在你的原贴按“运行代码”倒是行了,可具体怎么运用到贴图中我还是不会。
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<link rev="made" href="mailto:cn_yanzi@yahoo.com.cn" />
<title></title>
<style type="text/css">
TABLE.a, TD.a { width: 100%; height: 100%; background-color:silver }
TABLE.b, TD.b { background-color:red }
</style>
<script type="text/javascript">
function createimage() {
var how_many_ads = 5;
var now = new Date()
var sec = now.getSeconds()
var ad = sec % how_many_ads;
ad +=1;
document.getElementById("theimg"
.src = "http://img013.photo.wangyou.com/2005/7/28/126410/20051122602670" + ad + ".jpg";
}
</script>
</head>
<body onload="createimage()">
<p>
<img src="" id="theimg" width="361" height="536" alt="随机的图片" />
</p>
</body>
</html>