这是怎么回事?它说“悬停未定义”,但在我的 jsFiddle 中,代码工作正常:
<a href="#" onmouseover="hover(1);">click</a>
<div id="1"></div>
<script type="text/javscript">
function hover(x) {
var id = x;
var hoverBubble = document.getElementById(id);
hoverBubble.innerHTML = "hello";
}
</script>