DOM编程艺术敲了没反应 求查错

<!DOCTYPE html>



Shopping list

Snapshots

my image gallery

Choose an image

function showPic(whichpic){ var source = whichpic.getAttribute("href"); var placeholder = document.getElementById("placeholder"); placeholder.setAttribute("src",source); var text = whichpic.getAttribute("title"); var description = document.getElementById("description"); description.firstChild.nodeValue = text; }


https://download.csdn.net/download/lonelystar125/10297643
代码直接拷贝粘贴,不要找着敲,在不理解的情况下,抄很容易抄错。