好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

这段语句咋总报错?错在哪里了?_html/css_WEB-ITnose



function mouseOver(id, pic)
{
document.getElementById(id).src = pic
}
function mouseOut(id, pic)
{
document.getElementById(id).src = pic
}










回复讨论(解决方案)

               function mouseOver(id, pic)        {            document.getElementById(id).src = pic        }        function mouseOut(id, pic)        {            document.getElementById(id).src = pic        }                                            

onmouseover='方法()‘; 方法需要引号引起来

上面不是用引号了吗?难道引号里不能加参数吗?

报的什么错误,应该贴出错误信息或失败的截图。

上面不是用引号了吗?难道引号里不能加参数吗?
哪里有引号!!!你好好看我的代码是怎么写的

上面不是用引号了吗?难道引号里不能加参数吗?
onmouseover= ’mouseOver("img1", "https://img.https://img.e1.png") '
你看你代码这有引号吗


上面不是用引号了吗?难道引号里不能加参数吗?
哪里有引号!!!你好好看我的代码是怎么写的

擦,我看成括号了。

这个引号是单引号还是双引号?



上面不是用引号了吗?难道引号里不能加参数吗?
哪里有引号!!!你好好看我的代码是怎么写的

擦,我看成括号了。

这个引号是单引号还是双引号?

你括号里面双引号这里就用单引号 你括号里面有单引号外面就用双引号

明白了,谢谢!

感觉这个语法真是多此一举,何必要加引号呢。

分都给你。

查看更多关于这段语句咋总报错?错在哪里了?_html/css_WEB-ITnose的详细内容...

  阅读:31次