<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<html>
<head></head>
<script type="text/javascript">
function ck(){
alert("123");
var pwd = document.getElementById('pwd').value;
if(pwd == 0){
alert("对不起,你不是本网站用户请选择客户提交");
return false;
}
}
function checktwo(){
alert("123");
document.getElementById('pwd').value = "123";
}
</script>
<body>
<form id="form1" name="form1" method="post" action="http://www.baidu.com" οnsubmit="return ck();">
<table>
<tr>
<td>用户名:</td>
<td><input type="text" name="username"><input type="hidden" name="pwd" value=""></td>
</tr>
<tr>
<td><input type="image" src="../images/purple/button_tj.jpg" width="56" height="23" οnclick="checktwo();"/></td>
<td><input type="image" src="../images/purple/button_tj.jpg" width="57" height="23" border="0" /></td>
</tr>
</table>
</form >
</body>
</html>
不知道这个东西对大家有没有用.不过可以玩玩 挺有意思的