劝人回家的暖心话:jsp错误,高手进

来源:百度文库 编辑:中科新闻网 时间:2024/04/28 04:42:54
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>管理员登陆</title>
<style type="text/css">
<!--
.style1 {color: #FFFFFF}
th{font-size:16px;}
td{font-size:14px;}
-->
</style>
</head>

<body>
<%
String id=request.getParameter("id");
%>
<form name="form1" method="post" action="logo.jsp">
<table width="300" border="0" align="center" cellspacing="1" style="BORDER-BOTTOM: #4F7B0D 1px solid; BORDER-LEFT: #4F7B0D 1px solid; BORDER-RIGHT: #4F7B0D 1px solid; BORDER-TOP: #4F7B0D 1px solid">
<tr>
<td colspan="2"><table width="100%" border="0" cellspacing="0">
<tr>
<th height="20" bgcolor="#4F7B0D"><span class="style1">登陆管理页面</span></th>
</tr>
</table></td>
</tr>
<tr>
<td height="10" colspan="2"></td>
</tr>
<tr>
<td width="152"><div align="right">请输入管理员密码:</div></td>
<td width="159">
<input name="mm" type="password" id="mm" style="BORDER: #4F7B0D 1px solid;color: #4F7B0D;" size="15">
</td>
</tr>
<tr>
<td height="10" colspan="2"></td>
</tr>
<tr>
这个没有问题,但是下面一个有错误为什么??
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
<!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=gb2312">
<title>管理元登陆</title>
<style type="text/css">
<!--
.style2 {font-weight: bold; font-size: 16px; color: #FFFFFF;}
.style8 {
font-size: 14px;
font-weight: bold;
color: #000000;
}
.style10 {color: #000000}
-->
</style>
</head>

<body>
<form name="form1" method="post" action="qq1.jsp">
<table width="306" border="0" align="center">
<tr>
<td height="26" colspan="2" bgcolor="#33CC99"><div align="center" class="style2">登陆管理页面</div></td>
</tr>
<tr>
<td height="15" colspan="2"> <div align="center"></div></td>
</tr>
<tr>
<td height="20" colspan="2"><div align="center"><span class="style8">管理员密码</span><span class="style10">:</span>
<input name="mm" type="password" id="mm" style="BORDER: #4F7B0D 1px solid;color: #4F7B0D;" size="15">
</div></td>
</tr>
<tr>
<td height="15" colspan="2"><div align="center"></div></td>
</tr>
<tr>
<td width="147" height="25"><div align="right"><img src="2/img/ok1.jpg" width="69" height="20">
<% if(id!=null){%>
</div></td>
<td width="149"><div align="center"><img src="2/img/ok1.jpg" width="69" height="20"></div></td>
</tr>
</table>
<p> </p>
</form>
</body>
</html>

你的问题问的不是很明确,不过我初步看来是你最下面的if没有写全会造成错误。
<% if(id!=null){%> ------这里只有一半大括号,这样一定不能编译过去的。你把另一半补上就可以了。

<% if(id!=null){%>
这里是什么意思啊?
有开始没结尾啊? 你这个页面要实现什么功能啊?