<tr>
<td height="39" colspan="2" align="center" background="images/login_r4_c1.gif"><input type="image" src="images/button-denglu2.gif" width="75" height="27" onclick="login()" style="cursor:hand" name="imgbtn"></td>
<td><img src="images/spacer.gif" width="1" height="39" border="0" alt="" name="imgbtn"></td>
</tr>
<td height="39" colspan="2" align="center" background="images/login_r4_c1.gif"><input type="image" src="images/button-denglu2.gif" width="75" height="27" onclick="login()" style="cursor:hand" name="imgbtn"></td>
<td><img src="images/spacer.gif" width="1" height="39" border="0" alt="" name="imgbtn"></td>
</tr>
详情:http://www.8esky.com/handbook/dhtml/objects/INPUT_image.html
<body>
<form name="form1" method="post" action="#">
<table>
<tr>
<td width="139"> 工号:
</td>
<td width="140"><input name="STAFFNBR" type="text" id="STAFFNBR" size="15" onKeyDown="keydown1()" onmouseover="this.select()">
</td>
</tr>
<tr>
<td width="139"> 密码:
</td>
<td width="140"><input name="pwd" type="password" id="pwd" size="15" onKeyDown="keydown2()"></td>
</tr>
<tr align="center">
<td colspan="2"><img src="tj.gif" onClick="check_form()">
<img src="qx.gif" onClick="form.reset()">
</td>
</tr>
</table>
</form>
</body>
</html>
<SCRIPT LANGUAGE="JavaScript">
function check_form(){
if(form1.STAFFNBR.value==null){
alert("请输入登录工号");
}else if(form1.pwd.value==null){
alert("请输入密码");
}else{
form1.submit();
}
}
</SCRIPT><SCRIPT LANGUAGE="JavaScript">
<!--
document.form1.STAFFNBR.focus();
function keydown1()
{
if (event.keyCode==13)
form1.pwd.focus();
}
function keydown2()
{
if (event.keyCode==13)
check_form();
}
-->
</SCRIPT>