求JSP大神帮忙,怎么把这个页面放在背景中间?下面是我的代码和图片,jsp白痴。。求大神帮忙~
<%@pagelanguage="java"import="java.util.*"pageEncoding="gbk"%><%Stringpath=request.ge...
<%@ page language="java" import="java.util.*" pageEncoding="gbk"%>
<%
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="<%=basePath%>">
<title>登录页面</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="styles.css">
-->
<script type="text/javascript">
function chkData()
{
if(document.frm.uname.value=="")
{
alert("请输入用户名。");
document.frm.uname.focus();
return false;
}
else if(document.frm.upass.value=="")
{
alert("请输入密码信息。");
document.frm.upass.focus();
return false;
}
else
{
return true;
}
}
</script>
</head>
<body>
<form name="frm" method="post" action="doLogin.jsp">
<table align="center" border="1">
<tr>
<td>用户名:</td>
<td>
<input type="text" name="uname"/>
</td>
</tr>
<tr>
<td>密码:</td>
<td>
<input type="password" name="upass"/>
</td>
</tr>
<tr>
<td colspan="2" align="center">
<input type="submit" value="登录" onclick="return chkData();"/>
<input type="reset" value="重置"/>
</td>
</tr>
</table><img alt="" src="images/1.jpg" width="809" height="505">
</form>
</body>
</html>
<html> 展开
<%
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="<%=basePath%>">
<title>登录页面</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="styles.css">
-->
<script type="text/javascript">
function chkData()
{
if(document.frm.uname.value=="")
{
alert("请输入用户名。");
document.frm.uname.focus();
return false;
}
else if(document.frm.upass.value=="")
{
alert("请输入密码信息。");
document.frm.upass.focus();
return false;
}
else
{
return true;
}
}
</script>
</head>
<body>
<form name="frm" method="post" action="doLogin.jsp">
<table align="center" border="1">
<tr>
<td>用户名:</td>
<td>
<input type="text" name="uname"/>
</td>
</tr>
<tr>
<td>密码:</td>
<td>
<input type="password" name="upass"/>
</td>
</tr>
<tr>
<td colspan="2" align="center">
<input type="submit" value="登录" onclick="return chkData();"/>
<input type="reset" value="重置"/>
</td>
</tr>
</table><img alt="" src="images/1.jpg" width="809" height="505">
</form>
</body>
</html>
<html> 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询