<分区>
为什么这段代码不起作用?我正在使用 FF。
<head>
<script type="text/javascript">
document.getElementById("someID").onclick = function(){
alert("Yahooo");
}
</script>
</head>
<body>
<a href="#" id="someID">someID</a>
</body>
</html>
我收到 javascript 错误 getElementById 等于 null。