0

我刚刚完成了我的代码,但没有显示 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>
4

1 回答 1

3

标记的源属性在您上面粘贴的代码中拼写错误。它必须是 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>
于 2013-10-28T01:09:25.947 回答