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;
return false
}
问下这里的return false有什么用,为什么删掉这行代码全部程序就无法运行了,不是很理解
return有时候一定要出现在函数里面