在Firefox 3.6.10和3.6.7中,當第一次加載頁面並且鼠標指針位於鏈接上時,它變成了一隻手。但是,當我通過JavaScript將錨標記光標樣式設置爲auto時,並將鼠標指針懸停在同一個錨標記上時,它會顯示爲它是純文本。在IE8和Chrome中,它按預期工作(由我)。Firefox css光標屬性在錨標記
我理解錯了嗎?
<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>