没有问题啊,你再试试
<script>
function window.onload()
{
  alert("...........");
  document.all.xxx.focus();
}
</script>
<input name=xxx>