黑马程序员技术交流社区
标题:
做点击验证t码换图片的时候,做鼠标悬停效果做不出
[打印本页]
作者:
hhmm665544
时间:
2014-4-19 23:54
标题:
做点击验证t码换图片的时候,做鼠标悬停效果做不出
<!DOCTYPE html>
<html>
<head>
<title>register.html</title>
<meta name="content-type" content="text/html; charset=GBK">
<!--<link rel="stylesheet" type="text/css" href="./styles.css">-->
<script type="text/javascript">
function changeIma(img)
{
img.src = img.src + "?" + new Date().getTime();
}
</script>
</head>
<body>
<form action="">
<table>
<tr><th>用户名:</th><td><input type="text" name="username"/></td></tr>
<tr><th>密码:</th><td><input type="password" name="password"/></td></tr>
<tr><th>验证码:</th><td><input type="text" name="check"/><img src="/day6/ResponseDemo1" onclick="changeIma(this)" alt="换一张" style="cursor:hand" /></td></tr>
<tr><td colspan="2"><input type="submit" value="提交"/></td></tr>
</table>
</form>
</body>
</html>
复制代码
什么原因造成的呢?我样式也没写错啊,为什么就是没有效果呢?鼠标放图片上不会变成手的形状
作者:
。烊了
时间:
2014-4-20 16:18
cursor:hand 不是标准写法,IE支持它,Firefox,Chrome就不太能正常显示。,你换成cursor:pointer;试试,
作者:
hhmm665544
时间:
2014-4-20 16:56
。烊了 发表于 2014-4-20 16:18
cursor:hand 不是标准写法,IE支持它,Firefox,Chrome就不太能正常显示。,你换成cursor:pointer;试试, ...
我去试试看,我用的就是谷歌的浏览器
欢迎光临 黑马程序员技术交流社区 (http://bbs.itheima.com/)
黑马程序员IT技术论坛 X3.2