標準のテキスト枠のフォーカス

1571 ワード

<HTML>
<HEAD>
    <TITLE>       ——    </TITLE>

<SCRIPT LANGUAGE="JAVASCRIPT">
doc = document;

////////////////////////   initFields   /////////////////////////////////////////////////
//This function will initialize the button object and send focus to first input field.
//
function initFields(){
     document.forms[0].ID.focus()
// document.forms[0].submit().focus();
}

</SCRIPT>
</HEAD>
<BODY onLoad="initFields()">
<form>
 <center>
  <table width="100%" height="100%" cellPadding=0 cellSpacing=0 border="0">

  <tr>
    <td>   :</td>
     <td height=20>
     <input type=text size=12 name=ID  class=inputtxt style="background-color:#B0BFCF;width:90px">
      </td>
  </tr>
  <tr>
      <td>    :</td>
      <td height=20>
       <input type=password size=12 name=PWD class=inputtxt  style="background-color:#B0BFCF;width:90px"> 
       </td>
   </tr>
 
   <tr>
     <td>
        <input type="submit"  value="  " class="button2"/>
     </td>
    </tr>
  </table>
 </center>
 </form>
</BODY>
</HTML>