2009-05-04 97 views

回答

6

您确定您的代码没有其他问题吗?我没有IE8测试,但这个独立的例子完美地在IE7中工作 - 也许你可以在IE8中尝试它?

<html><body> 
<form><input type='text' id='bim'></form> 
<script>document.getElementById('bim').focus()</script> 
</body></html> 
+0

是的,你是绝对正确的。我的代码中有一个无关的错误,它阻止了它在IE中的工作。 – 2009-05-04 21:53:29