html jsp 图像坐标,用户登录框
image.html
<!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=UTF-8">
<title>Insert title here</title>
<style type="html/css">
<!--
.TRYLE1{
font-size: large;
}
-->
</style>
</head>
<body>
请在用户名和密码处输入12345
<form name="form1" action="image.jsp" method="post">
用户名:<input type="text" name="username">
密码: <input type="password" name="password">
<input type="image" src ="login.gif">
</form>
</body>
</html>
image.jsp
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!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=UTF-8">
<title>Insert title here</title>
</head>
<body>
<%
//获取用户名:
String username=request.getParameter("username");
//获取密码
String passw=request.getParameter("password");
if(username.equals("12345")&&passw.equals("12345")){
out.println("<font color="green" >");
out.println("登录成功");
out.println("</font>");
}else {
out.print("<font color="red">");
out.print("登录失败");
out.print("</font>");
}
%>
</body>
</html>