function showPic(whichpic) {? if (!document.getElementById("placeholder")) return true;//1.比如這個:如果瀏覽器不支持。也沒別的函數(shù)調(diào)用這個函數(shù)。那 return false 傳給誰?誰會接收這個return?? var source = whichpic.getAttribute("href");? var placeholder = document.getElementById("placeholder");? placeholder.setAttribute("src",source);? if (!document.getElementById("description")) return false;? if (whichpic.getAttribute("title")) {? ? var text = whichpic.getAttribute("title");? } else {? ? var text = "";? }? var description = document.getElementById("description");? if (description.firstChild.nodeType == 3) {? ? description.firstChild.nodeValue = text;? }? return false;}? for ( var i=0; i < links.length; i++) {? ? links[i].onclick = function() {? ? ? return showPic(this); }? ? links[i].onkeypress = links[i].onclick;? }}這些代碼是js dom編程藝術(shù)里的。
請教大神一個js問題:想知道這些代碼里面的return false是傳給誰?
艾倫的吉他
2017-02-15 22:53:48