怎么在html网页上随机显示图片 100
<html><head><metahttp-equiv="Content-Type"content="text/html;charset=gbk"><title>666<...
<html><head><meta http-equiv="Content-Type" content="text/html; charset=gbk"><title>666</title><meta name="keywords" content="666" /><meta name="Description" content="666" /><meta http-equiv="Cache-Control" content="no-transform" /><meta http-equiv="Cache-Control" content="no-siteapp"><meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=0.5, maximum-scale=2.0, user-scalable=yes"><script type='text/javascript' src="js.js"></script></head><body bgcolor="#FFFFFF" text="#000000"><p align="center"><a rel="nofollow" href="/un/go.php" target="_blank"><img border="0" height="180" src="pics/2117.jpg"><img border="0" height="180" src="pics/2238.jpg"></a></p><p align="center"><a rel="nofollow" href="/un/go.php" target="_blank"><img src="/img/01.png" width="198" height="45" alt="666"></a><a rel="nofollow" href="/un/go.php"><img src="/img/02.png" width="198" height="45" alt="666"></a></p>
各位大神帮我看看,要怎么修改 展开
各位大神帮我看看,要怎么修改 展开
2018-10-10
展开全部
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gbk">
<title>666</title>
<meta name="keywords" content="666" />
<meta name="Description" content="666" />
<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=0.5, maximum-scale=2.0, user-scalable=yes">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p align="center">
<a rel="nofollow" href="/un/go.php" target="_blank">
<img border="0" height="180" id="myPicture">
</a>
</p>
</body>
<script type="text/javascript">
window.onload = choosePic;
function choosePic() {
var myPix = new Array("/img/01.png","/img/02.png","pics/2117.jpg","pics/2238.jpg");
var randomNum = Math.floor((Math.random() * myPix.length));
document.getElementById("myPicture").src = myPix[randomNum];
}
</script>
</html>
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询