Javascript代码运行不正常

Javascript代码运行不正常,javascript,html,image,onmouseover,onmouseout,Javascript,Html,Image,Onmouseover,Onmouseout,我刚写完代码,但没有显示tick.gif,而是显示了“tick”一词,上面有一个方框。此外,onmouseover功能也不起作用 <!DOCTYPE html> <html> <head> <title>Changeup test</title> </head> <body> <img scr="tick.gif" alt="tick" onmouseover="this.scr='tick2.gif';

我刚写完代码,但没有显示tick.gif,而是显示了“tick”一词,上面有一个方框。此外,onmouseover功能也不起作用

<!DOCTYPE html>
<html>
<head>
<title>Changeup test</title>
</head>
<body>
<img scr="tick.gif" alt="tick" onmouseover="this.scr='tick2.gif';
"onmouseout="this.gif='tick.gif';" />
</body>
</html>

更换试验

在上面粘贴的代码中,标记的源属性拼写错误。它需要是src

<!DOCTYPE html>
<html>
  <head>
  <title>Changeup test</title>
  </head>
  <body>
    <img src="tick.gif" alt="tick" onmouseover="this.src='tick2.gif'; "onmouseout="this.src='tick.gif';" />
  </body>
</html>

更换试验

在上面粘贴的代码中,标记的源属性拼写错误。它需要是src

<!DOCTYPE html>
<html>
  <head>
  <title>Changeup test</title>
  </head>
  <body>
    <img src="tick.gif" alt="tick" onmouseover="this.src='tick2.gif'; "onmouseout="this.src='tick.gif';" />
  </body>
</html>

更换试验

在上面粘贴的代码中,标记的源属性拼写错误。它需要是src

<!DOCTYPE html>
<html>
  <head>
  <title>Changeup test</title>
  </head>
  <body>
    <img src="tick.gif" alt="tick" onmouseover="this.src='tick2.gif'; "onmouseout="this.src='tick.gif';" />
  </body>
</html>

更换试验

在上面粘贴的代码中,标记的源属性拼写错误。它需要是src

<!DOCTYPE html>
<html>
  <head>
  <title>Changeup test</title>
  </head>
  <body>
    <img src="tick.gif" alt="tick" onmouseover="this.src='tick2.gif'; "onmouseout="this.src='tick.gif';" />
  </body>
</html>

更换试验

this.gif
也应该是
this.src
。是的,我很抱歉第一次没有看到。没有属性
.gif
。您应该改用
.src
。谢谢你发现它。
this.gif
可能也应该是
this.src
。是的,很抱歉第一次没有看到。没有属性
.gif
。您应该改用
.src
。谢谢你发现它。
this.gif
可能也应该是
this.src
。是的,很抱歉第一次没有看到。没有属性
.gif
。您应该改用
.src
。谢谢你发现它。
this.gif
可能也应该是
this.src
。是的,很抱歉第一次没有看到。没有属性
.gif
。您应该改用
.src
。谢谢你发现它。有趣的事实。。。在处理程序属性中引用元素的属性不需要
这个
。可以将属性视为变量
onmouseover=“src='tick2.gif';”
Fun fact。。。在处理程序属性中引用元素的属性不需要
这个
。可以将属性视为变量
onmouseover=“src='tick2.gif';”
Fun fact。。。在处理程序属性中引用元素的属性不需要
这个
。可以将属性视为变量
onmouseover=“src='tick2.gif';”
Fun fact。。。在处理程序属性中引用元素的属性不需要
这个
。可以将属性视为变量
onmouseover=“src='tick2.gif';”