jave学习第四节

来源:互联网 发布:淘宝买家信誉评价 编辑:程序博客网 时间:2024/05/21 07:56
<%@ page language="java" contentType="text/html; charset=GB18030"pageEncoding="GB18030"%><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html><head><meta http-equiv="Content-Type" content="text/html; charset=GB18030"><title>Insert title here</title><script type="text/javascript">function test() {var name_1 = document.formData.password.value;if(name_1.length<6){alert("密码不足六位,重新输入");return false;}return true;}</script></head><body><form action="../servlet/LoginServlet" method="post" name="formData">用户名:<input type="text" name="username" value="neusoft" /><br>密码:  <input type="password" name="password" value="123456"><br><input type="submit" value="提交" onclick="return test()"><input type="reset" value="重置"></form></body></html>