[英]Javascript code not running properly
i just finished my code but instead of showing tick.gif it shows the word "tick" with a box over it. 我刚刚完成代码,但没有显示tick.gif,而是在其上方显示了一个框“ tick”。 Also the onmouseover feature isn't working either.
另外,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>
The source attribute for the tag is misspelled in the code you pasted above. 标签的源属性在上面粘贴的代码中拼写错误。 It needs to be src.
它必须是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>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.