document.write("<SCRIPT language=javascript>")
document.write(" usernameshow.focus();")
document.write("</SCRIPT>")

解决方案 »

  1.   

    document.write("<SCRIPT language=javascript>")
    document.write("<!--")
    document.write("function window_onload() {")
    document.write(" document.form1.usernameshow.focus();")   //写上form名称
    document.write("}")
    document.write("//-->")
    document.write("</SCRIPT>")试试
      

  2.   

    你在进入页面的时候调用window_onload()这个函数了吗?
      

  3.   

    <body onload="document.myForm.usernameshow.focus();">这样就行了
      

  4.   

    在JavaScript里以document.write方式直接重载是不可以的,想再重载必须在外部调用。