JSP 04课 (2)

微信扫一扫,分享到朋友圈

JSP 04课 (2)

技术图片技术图片

<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%String path=request.getContextPath();
String basePath= request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="http://mamicode.com/<%=basePath%>">
<title>My JSP ‘login.jsp‘ starting page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="http://mamicode.com/styles.css">
-->
</head>
<body>
<form action="doLogin.jsp" method="post">
<div align="center" style="background: url(images/Snap1.jpg);background-repeat:no-repeat;background-position-x:50%;height:500px">
<div style="margin-left:250px;margin-top:130px">
<p>用户名:</p><input type="text" name="uname" style="width:150px;height:30"><br>
<p >密码:</p><input type="password" name="upwd" style="width:150px;height:30"><br>
<br><input type="submit" name="LOGIN" value=" " style="background: url(images/login.gif);background-repeat:no-repeat;heigth:20px;width:110px" >
</div>
</div>
</form>
</body>
</html>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%String path=request.getContextPath();
String basePath= request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="http://mamicode.com/<%=basePath%>">
<title>My JSP ‘doLogin.jsp‘ starting page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="http://mamicode.com/styles.css">
-->
</head>
<body>
<%request.setCharacterEncoding("utf-8");
String name=request.getParameter("uname");
String pwd=request.getParameter("upwd");if(name.equals("lucky")&&pwd.equals("123456")){
request.getRequestDispatcher("welcome.jsp").forward(request,response);
}else{
request.getRequestDispatcher("login.jsp").forward(request,response);
}%>
</body>
</html>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%String path=request.getContextPath();
String basePath= request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="http://mamicode.com/<%=basePath%>">
<title>My JSP ‘welcome.jsp‘ starting page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="http://mamicode.com/styles.css">
-->
</head>
<body>
<div align="center">
<p>你好!Lucky!</p>
</div>
</body>
</html>

 

JSP 04课 (2)

原文地址:https://www.cnblogs.com/naoguakerteng/p/12588223.html

纯css写一个带动画的弹框 visibility + opcity

上一篇

linux qt5安装

下一篇

你也可能喜欢

JSP 04课 (2)

长按储存图像,分享给朋友