index1中转页面:
在这里插入代码片
<%@ 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>jsp:forward</title>
</head>
<body>
<jsp:forward page="login1.jsp"/>
</body>
</html>
login1跳转页:
<%@ 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>用户登录</title>
<link type="text/css" rel="stylesheet" href="css1.css"/>
</head>
<body>
<form name="form1" method="post" action="">
用户名:<input type="text" name="name" id="name">
<br>
密 码:<input type="password" name="name" id="psw">
<br>
<input type="submit" name="Submit" id="butto" value="提交">
</form>
</body>
</html>
CSS文件(css1.css)
#name{
width:600px;
}
#psw{
width:600px;
}
#butto{
background-color:red;
}
运行结果如图: