【发布时间】:2012-07-15 21:48:56
【问题描述】:
在 Firefox 3.6.10 和 3.6.7 中,当第一次加载页面并且鼠标指针悬停在链接上时,它会变成一只手。但是,当我通过 javascript 将锚标记光标样式设置为自动并将鼠标指针悬停在同一个锚标记上时,它现在显示为纯文本。在 IE8 和 Chrome 中,它按预期工作(由我)。
我理解错了吗?
<html lang="en">
<head>
<script type="text/javascript">
function cursor_auto() {
document.getElementById('anchor').style.cursor = 'auto';
}
function cursor_pointer() {
document.getElementById('anchor').style.cursor = 'pointer';
}
</script>
</head>
<body>
<a href="http://example.com" id="anchor">Example</a>
<input type="button" onclick="cursor_auto();" value="Cursor Auto">
<input type="button" onclick="cursor_pointer();" value="Cursor Pointer">
</body>
</html>
【问题讨论】:
标签: javascript html css firefox cursor