_潇潇暮雨
a链接的默认事件就是跳转啊,所以要阻止默认事件,我帮你改了下:html>
Snapshotsfunction showPic(whichpic){
var source = whichpic.getAttribute("data-img");
var placeholder = document.getElementById('placeholder');
placeholder.setAttribute("src",source)
var text =whichpic.getAttribute('title');
var description = document.getElementById("description");
description.firstChild.nodeValue = text;
}
function countBodyChildren(){
var body_element = document.getElementsByTagName('body')[0];
}
window.onload = countBodyChildren;
Snapshots
- fireworks
- Coffee
- Rose
- Big Ben
Choose an image.