<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<style>
h3{
text-align: center;
}
.user{
color: #999;
}
form{
text-align: center;
}
form .rem{
margin-left: 30px;
}
</style>
<body>
<%@ include file="_a4_include静态包含登陆页面_top.jsp"%><!-- 静态包含 -->
<%-- <jsp:include page="_a4_登陆页面_top.jsp"></jsp:include> --%> <!-- 这是动态包含,运行时的包含 -->
<h3>欢迎进入清华大学用户登陆页面</h3>
<form type="text" action="_a4_登陆页面_.jsp" method="post">
<p> 用户名:<input type="text" name="username" value="请输入用户名" class="user"
onfocus="if(this.value=='请输入用户名'){this.value='';this.style.color='#424242'} "
onblur="if(this.value==''){this.value='请输入用户名' ; this.style.color='#999'}">
</p>
<p> 密 码:<input type="password" name="password"> </p>
<input type="submit" value="登陆" class="rem">
<input type="reset" value="重置" class="rem">
</form>
<%@ include file="_a4_include静态包含登陆页面_bottom.jsp"%>
</body>
<script type="text/javascript">
</script>
</html>
_a4_include静态包含登陆页面_bottom.jsp:
<%@ page contentType="text/html; charset=UTF-8" %>
<table width="100%" cellspacing="0" cellpadding="4" align="center" bordercolor="#A6CAF0" border=1>
<tr>
<td> <div align="center">
<p>清华大学软件系 <br>
学校地址:北京市黄泉路1880号花拳绣腿<br/>
电话:100010001
</p>
</div></td>
</tr>
</table>
最终效果:
上面的方法使用的是include静态包含
但是注释里有include动态包含
所以可将静态包含删除,使用注释中的动态包含也是一样的