我想在网页里点击链接把图片显示在下面的占位符图片里,怎么实现不了?代码那里有问题?
<!doctype html>
<html>
<head>
<meta charset="UTF-8" /> <title>Document</title>
</head>
<body>
<h2>你是谁我是谁</h2>
<ul>
<li><a href="../img/201501241607401485.jpg">我拿你</a></li>
<li><a href="../img/2015419153163014.jpg">的钱了</a></li>
<li><a href="../img/FbeTDhbkgvscmbf.jpg">买东东</a></li>
</ul>
<img id="box" src="../img/gxy1211bu03s.jpg"/>
<script type="text/javascript">
function hanShu(ooppn){
oopp.getAttribute("href");
var ppool = ooppn.getAttribute("href");
document.getElementById("box");
var kxxaq = document.getElementById("box");
kxxaq.setAttribute("src",ppool);
}
</script>
</body>
</html>
相关分类