js小白问题 求大神帮忙看,注释的那三行破坏了return false的作用,这是怎么回事,怎么改啊




my image gllay 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
如果function有语法错误,结果相当于返回true。建议看看是否有js语法错误
注:f12看浏览器信息

你这连接都没用啊!

 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呀,都没有呀!

就这些代码应该跑错才对呀!F12控制台应该跑错啦吧!