本人菜鸟,望大家帮忙,已经搞了三天了没有弄出来。
在项目下运行只显示一半,总是在个人信息添写前面多一个<td cospan ="3" a 这几个字母。单独在dreamweaver下看页面是全的。
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
<%//保证获得传送信息中的汉字信息
response.setContentType("text/html;charset=gb2312");
request.setCharacterEncoding("gb2312");
%><jsp:useBean id="codes" scope="page" class="jbqk.code_insert"/>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<script language="JavaScript">
function dologin1()
{
var flag = 0;
var theform = document.registForm;
if(theform.J_xm.value=="")
{ flag = -1;
alert("姓名不能为空!");
theform.J_xm.focus();
return;
}
if(theform.J_xb.checked==false)
{
alert("性别不能为空!");
theform.J_xb.focus();
return;
}
if(theform.J_sfzh.value=="")
{ flag = -1;
alert("身份证不能为空!");
theform.J_sfzh.focus();
return;
}
if(!IsNumberStr(theform.J_sfzh.value))
{
flag = -1;
alert("身份证号不能为非数字");
theform.J_sfzh.focus();
return;
}
if(theform.J_gzdw.value=="")
{ flag = -1;
alert("工作单位不能为空!");
theform.J_gzdw.focus();
return;
}
if(theform.J_bm.value=="")
{ flag = -1;
alert("部门不能为空!");
theform.J_bm.focus();
return;
}
if(theform.J_xs.value=="")
{ flag = -1;
alert("系室不能为空!");
theform.J_xs.focus();
return;
}
if(theform.J_zp.value=="")
{
flag = -1;
alert("照片不能为空");
theform.J_zp.focus();
return;
}
if(theform.J_zzxl.value=="" && theform.J_zzxl.value=="请选择")
{
flag=-1;
alert("最终学历不能为空");
theform.J_zzxl.focus();
return;
}
if(theform.J_zzxw.value=="" && theform.J_zzxw.value=="请选择")
{
flag=-1;
alert("最终学历不能为空");
theform.J_zzxw.focus();
return;
}
if(theform.J_zm.value=="")
{
flag=-1;
alert("组名不能为空");
theform.J_zm.focus();
return;
}
if(theform.J_zsh.value=="")
{
flag=-1;
alert("证书号不能为空");
theform.J_zsh.focus();
return;
}
if(theform.J_fs.value=="")
{
flag=-1;
alert("分数不能为空");
theform.J_fs.focus();
return;
}
if(theform.J_tjdw.value=="")
{
flag=-1;
alert("推荐单位不能为空");
theform.J_tjdw.focus();
return;
}
if(flag==0)
{
theform.submit();
alert("信息成功提交");
}
}
function IsDigital(CharCheck)
{
return (('0'<=CharCheck)&&(CharCheck<='9'));
}function IsNumberStr(str)
{
var retu = true;
var checkChar;
for (var i=0;i<str.length;++i){
checkChar=str.charAt(i);
if (!(IsDigital(checkChar))){
retu=false;
break;
}
}
return retu;
}
</script>
<style type="text/css">
<!--
body {
background-color: #FFFFFF;
}
.STYLE11 {
font-size: 24px;
color: #FF0000;
font-family: "华文行楷";
font-weight: bold;
}
.STYLE12 {color: #0000FF}
.STYLE14 {font-size: 14px}
.STYLE15 {
font-size: 24px;
color: #0000FF;
}
.STYLE16 {font-size: 24px}
.STYLE17 {font-size: 18px}
.STYLE18 {
color: #FF0000;
font-size: 14px;
}
.STYLE19 {color: #000000}
.STYLE23 {color: #FF0000}
.STYLE30 {font-size: 14px; color: #666666; }
.STYLE39 {color: #0000CC}
a:link {
text-decoration: none;
}
a:visited {
text-decoration: none;
}
a:hover {
text-decoration: none;
}
a:active {
text-decoration: none;
}
.STYLE44 {color: #666666}
.STYLE46 {color: #FF0000; font-size: 12px; }
.STYLE47 {font-size: 12px}
.STYLE48 {font-size: 12px; color: #000099; }
.STYLE49 {font-family: "华文行楷"}
.STYLE51 {color: #666666; font-size: 12px; }
.STYLE52 {
font-size: 36px;
font-family: "华文彩云";
color: #FF0000;
}
.STYLE53 {color: #0000FF; font-size: 14px; }
-->
</style></head><body>
<%
//ResultSet rs1 = conn1.executeQuery("select * from Cmz");
ResultSet rs_mzcode = codes.executeQuery("select * from c_mz");
//ResultSet rs2 = conn1.executeQuery("select * from Cxl");
ResultSet rs_zzxlcode = codes.executeQuery("select * from c_xl");
//ResultSet rs3 = conn1.executeQuery("select * from Cxw");
ResultSet rs_zzxwcode = codes.executeQuery("select * from c_xw");
//ResultSet rs4 = conn1.executeQuery("select * from Czw");
ResultSet rs_zwcode = codes.executeQuery("select * from c_zw");
ResultSet rs_zzmmcode = codes.executeQuery("select * from c_zzmm");
%>
<center>
在项目下运行只显示一半,总是在个人信息添写前面多一个<td cospan ="3" a 这几个字母。单独在dreamweaver下看页面是全的。
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
<%//保证获得传送信息中的汉字信息
response.setContentType("text/html;charset=gb2312");
request.setCharacterEncoding("gb2312");
%><jsp:useBean id="codes" scope="page" class="jbqk.code_insert"/>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<script language="JavaScript">
function dologin1()
{
var flag = 0;
var theform = document.registForm;
if(theform.J_xm.value=="")
{ flag = -1;
alert("姓名不能为空!");
theform.J_xm.focus();
return;
}
if(theform.J_xb.checked==false)
{
alert("性别不能为空!");
theform.J_xb.focus();
return;
}
if(theform.J_sfzh.value=="")
{ flag = -1;
alert("身份证不能为空!");
theform.J_sfzh.focus();
return;
}
if(!IsNumberStr(theform.J_sfzh.value))
{
flag = -1;
alert("身份证号不能为非数字");
theform.J_sfzh.focus();
return;
}
if(theform.J_gzdw.value=="")
{ flag = -1;
alert("工作单位不能为空!");
theform.J_gzdw.focus();
return;
}
if(theform.J_bm.value=="")
{ flag = -1;
alert("部门不能为空!");
theform.J_bm.focus();
return;
}
if(theform.J_xs.value=="")
{ flag = -1;
alert("系室不能为空!");
theform.J_xs.focus();
return;
}
if(theform.J_zp.value=="")
{
flag = -1;
alert("照片不能为空");
theform.J_zp.focus();
return;
}
if(theform.J_zzxl.value=="" && theform.J_zzxl.value=="请选择")
{
flag=-1;
alert("最终学历不能为空");
theform.J_zzxl.focus();
return;
}
if(theform.J_zzxw.value=="" && theform.J_zzxw.value=="请选择")
{
flag=-1;
alert("最终学历不能为空");
theform.J_zzxw.focus();
return;
}
if(theform.J_zm.value=="")
{
flag=-1;
alert("组名不能为空");
theform.J_zm.focus();
return;
}
if(theform.J_zsh.value=="")
{
flag=-1;
alert("证书号不能为空");
theform.J_zsh.focus();
return;
}
if(theform.J_fs.value=="")
{
flag=-1;
alert("分数不能为空");
theform.J_fs.focus();
return;
}
if(theform.J_tjdw.value=="")
{
flag=-1;
alert("推荐单位不能为空");
theform.J_tjdw.focus();
return;
}
if(flag==0)
{
theform.submit();
alert("信息成功提交");
}
}
function IsDigital(CharCheck)
{
return (('0'<=CharCheck)&&(CharCheck<='9'));
}function IsNumberStr(str)
{
var retu = true;
var checkChar;
for (var i=0;i<str.length;++i){
checkChar=str.charAt(i);
if (!(IsDigital(checkChar))){
retu=false;
break;
}
}
return retu;
}
</script>
<style type="text/css">
<!--
body {
background-color: #FFFFFF;
}
.STYLE11 {
font-size: 24px;
color: #FF0000;
font-family: "华文行楷";
font-weight: bold;
}
.STYLE12 {color: #0000FF}
.STYLE14 {font-size: 14px}
.STYLE15 {
font-size: 24px;
color: #0000FF;
}
.STYLE16 {font-size: 24px}
.STYLE17 {font-size: 18px}
.STYLE18 {
color: #FF0000;
font-size: 14px;
}
.STYLE19 {color: #000000}
.STYLE23 {color: #FF0000}
.STYLE30 {font-size: 14px; color: #666666; }
.STYLE39 {color: #0000CC}
a:link {
text-decoration: none;
}
a:visited {
text-decoration: none;
}
a:hover {
text-decoration: none;
}
a:active {
text-decoration: none;
}
.STYLE44 {color: #666666}
.STYLE46 {color: #FF0000; font-size: 12px; }
.STYLE47 {font-size: 12px}
.STYLE48 {font-size: 12px; color: #000099; }
.STYLE49 {font-family: "华文行楷"}
.STYLE51 {color: #666666; font-size: 12px; }
.STYLE52 {
font-size: 36px;
font-family: "华文彩云";
color: #FF0000;
}
.STYLE53 {color: #0000FF; font-size: 14px; }
-->
</style></head><body>
<%
//ResultSet rs1 = conn1.executeQuery("select * from Cmz");
ResultSet rs_mzcode = codes.executeQuery("select * from c_mz");
//ResultSet rs2 = conn1.executeQuery("select * from Cxl");
ResultSet rs_zzxlcode = codes.executeQuery("select * from c_xl");
//ResultSet rs3 = conn1.executeQuery("select * from Cxw");
ResultSet rs_zzxwcode = codes.executeQuery("select * from c_xw");
//ResultSet rs4 = conn1.executeQuery("select * from Czw");
ResultSet rs_zwcode = codes.executeQuery("select * from c_zw");
ResultSet rs_zzmmcode = codes.executeQuery("select * from c_zzmm");
%>
<center>
解决方案 »
- hibernate查询数据
- structs1.x中插入数据时用户关闭浏览器的结果?
- hibernate和struts结合出现错误,请各位朋友帮忙看下!
- WAP开发,怎么获得访问的URL?
- 高手快来帮帮菜鸟,关于struts的
- 如何用java实现邮件客户端的收件箱、发件箱等功能
- struts2的validation文件放在classpath里可以吗?
- WAP 简单问题求教。高分送上。
- 关于Jsp页面标签属性中class属性的一个小问题
- 谁能帮我生成5000个格式为"yyyy-MM-dd HH-mm-ss"的日期,时间为2014年9月1日到9月30日
- 很怪的错误 解决者给50分
- 一个Struts2跳转不刷新的问题
<!--DWLayoutTable-->
<tr>
<td height="42" colspan="2" valign="bottom" bordercolorlight=#FFFFFF bordercolordark=#FFFFF><div align="center"><span class="STYLE12 STYLE52"><strong>科 研 管 理 系 统</strong></span></div></td>
</tr>
<tr>
<td width="50%" height= "22" valign="top" bordercolorlight=#FFFFFF bordercolordark=#FFFFF><div align="right" class="STYLE12 STYLE17"><marquee direction="left">
<span class="STYLE17"><<<---------------------------------</span>
</marquee></div> </td>
<td width="50%" height="22" valign="top" bordercolorlight=#FFFFFF bordercolordark=#FFFFF><div align="center" class="STYLE15">
<div align="left" class="STYLE16"><marquee direction="right">
<span class="STYLE17">--------------------------------->>></span>
</marquee>
</div>
</div></td>
</tr>
</table>
</center>
</br>
<center>
<!--DWLayoutTable-->
<tr>
<td height="31" align="center" valign="bottom"><div align="center" class="STYLE11 STYLE17"> 填 写 个 人 信 息</div></td>
</tr>
</table>
</center>
<center>
<table width="90%" border="1" cellpadding="5" cellspacing="5" bordercolor="#00CCFF">
<!--DWLayoutTable-->
<tr>
<td width="831" height="1348" align="center" valign="top">
<form action="jbqkInsert.jsp" method="post" name="registForm" id="registForm">
<table width="100%" border="0" align="center" cellspacing="1" >
<!--DWLayoutTable-->
<tr valign="bottom">
<td height="16" colspan="5" align="center" bgcolor="#FFFBF0"><p class="STYLE53">--- <strong>个人基本信息 <span class="STYLE47">*</span>必填</strong> ---</p> </td>
</tr>
<tr bgcolor="#99CCFF">
<td width="16%" height="8" align="right" valign="middle"><div align="right"><span class="STYLE48">编号<strong>:</strong></span></div></td>
<td colspan="3" align="left" valign="bottom" bgcolor="#EEF9FD"> <label>
<input name="textfield" type="text" disabled="disabled" value="提交后自动生成" />
<br />
</label></td>
<td width="186" rowspan="5" align="center" valign="middle" bgcolor="#99CCFF"></td>
</tr>
<tr bgcolor="#99CCFF">
<td width="16%" height="9" align="right" valign="middle" class="STYLE48">用户类别:</td>
<td colspan="3" align="left" valign="bottom" bgcolor="#EEF9FD"><label>
<input name="J_userlb" type="text" id="J_userlb" disabled="disabled" value=<%=session.getAttribute("userlb")%>>
</label></td>
</tr>
<tr bgcolor="#99CCFF">
<td width="16%" height="18" align="right" valign="middle"><div align="right"><span class="STYLE48">姓名<strong>:</strong></span></div></td>
<td colspan="3" align="left" valign="bottom" bgcolor="#EEF9FD"> <label>
<input name="J_xm" type="text" id="J_xm" />
<span class="STYLE46">*</span></label> </td>
</tr>
<tr bgcolor="#99CCFF">
<td width="16%" height="22" align="right" valign="middle" bgcolor="#99CCFF"><div align="right"><span class="STYLE48">性别<strong>:</strong></span></div></td>
<td colspan="3" align="left" valign="bottom" bgcolor="#EEF9FD">
<label>
<input name="J_xb" type="radio" value="男" checked="checked" />
<span class="STYLE30">男</span> </label> <label>
<input name="J_xb" type="radio" value="女" />
<span class="STYLE14"> <span class="STYLE44">女</span></span></label> </td>
</tr>
<tr bgcolor="#99CCFF">
<td width="16%" height="24" align="right" valign="middle"><div align="right"><span class="STYLE48">身份证号<strong>:</strong></span></div></td>
<td colspan="3" align="left" valign="bottom" bgcolor="#EEF9FD"> <label>
<input name="J_sfzh" type="text" id="J_sfzh" />
<span class="STYLE46">*</span></label> </td>
</tr>
<tr bgcolor="#99CCFF">
<td width="133" height="23" align="right" valign="middle"><div align="right"><span class="STYLE48">出生日期<strong>:</strong></span></div></td>
<td colspan="3" align="left" valign="bottom" bgcolor="#EEF9FD"> <label>
<select name="J_csrq1" size="1" id="J_csrq1">
<option selected="selected">1949</option>
<option>1950</option>
<option>1951</option>
<option>1952</option>
<option>1953</option>
<option>1954</option>
<option>1955</option>
<option>1956</option>
<option>1957</option>
<option>1958</option>
<option>1959</option>
<option>1960</option>
<option>1961</option>
<option>1962</option>
<option>1963</option>
<option>1964</option>
<option>1965</option>
<option>1966</option>
<option>1967</option>
<option>1968</option>
<option>1969</option>
<option>1970</option>
<option>1972</option>
<option>1973</option>
<option>1974</option>
<option>1975</option>
<option>1976</option>
<option>1977</option>
<option>1978</option>
<option>1979</option>
<option>1980</option>
<option>1981</option>
<option>1982</option>
<option>1983</option>
<option>1984</option>
<option>1985</option>
<option>1986</option>
<option>1987</option>
<option>1988</option>
<option>1989</option>
<option>1990</option>
</select>
<span class="STYLE30">年</span>
<select name="J_csrq2" size="1" id="J_csrq2">
<option selected="selected">1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
<option>6</option>
<option>7</option>
<option>8</option>
<option>9</option>
<option>10</option>
<option>11</option>
<option>12</option>
</select>
<span class="STYLE30">月</span>
<select name="J_csrq3" size="1" id="J_csrq3">
<option selected="selected">1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
<option>6</option>
<option>7</option>
<option>8</option>
<option>9</option>
<option>10</option>
<option>11</option>
<option>12</option>
<option>13</option>
<option>14</option>
<option>15</option>
<option>16</option>
<option>17</option>
<option>18</option>
<option>19</option>
<option>20</option>
<option>21</option>
<option>22</option>
<option>23</option>
<option>24</option>
<option>25</option>
<option>26</option>
<option>27</option>
<option>28</option>
<option>29</option>
<option>30</option>
<option>31</option>
</select>
<span class="STYLE14"><span class="STYLE44">日</span><span class="STYLE46">*</span></span></label> </td>
<td width="186" align="center" valign="middle" bgcolor="#99CCFF"><label>
<input name="J_zp" type="file" id="J_zp" size="10" /> </label></td>
</tr>
<tr bgcolor="#99CCFF">
<td width="133" height="18" align="right" valign="middle"><div align="right" class="STYLE48">
<div align="right">工作单位<strong>:</strong></div>
</div></td>
<td colspan="4" align="left" valign="bottom" bgcolor="#EEF9FD"> <label>
<input name="J_gzdw" type="text" id="J_gzdw" size="25" />
<span class="STYLE46">*</span></label> </td>
</tr>
<td width="133" height="18" align="right" valign="middle" bgcolor="#99CCFF" class="STYLE48"><div align="right"><span class="STYLE48">部门<strong>:</strong></span></div></td>
<td width="34%" align="left" valign="bottom" bgcolor="#EEF9FD"> <label>
<input name="J_bm" type="text" id="J_bm" size="20" />
<span class="STYLE46">*</span></label></td>
<td width="16%" align="right" valign="middle" bgcolor="#99CCFF"><span class="STYLE48">系或室<strong>:</strong></span></td>
<td colspan="2" align="left" valign="bottom" bgcolor="#EEF9FD"><label>
<input name="J_xs" type="text" id="J_xs" size="20" />
<span class="STYLE46">*</span></label></td>
</tr>
<tr bgcolor="#99CCFF">
<td width="133" height="26" align="right" valign="middle"><div align="right"><span class="STYLE48">最终学历(代码)<strong>:</strong></span></div></td>
<td width="237" align="left" valign="bottom" bgcolor="#EEF9FD"> <label>
<select name="J_zzxl" size="1" id="J_zzxl">
<option>请选择</option>
<%while(rs_zzxlcode.next()){%>
<option > <%=rs_zzxlcode.getString(2)%> <%=rs_zzxlcode.getString(3)%></option>
<% } rs_zzxlcode.close();%>
</select>
<span class="STYLE46">*</span></label> </td>
<td align="right" width="161" valign="middle" bgcolor="#99CCFF"><span class="STYLE48">最终学位(代码)<strong>:</strong></span></td>
<td colspan="2" align="left" valign="top" bgcolor="#EEF9FD"><label>
<select name="J_zzxw" size="1" id="J_zzxw">
<option selected="selected">请选择</option>
<%while(rs_zzxwcode.next()){%>
<option ><%=rs_zzxwcode.getString(2)%> <%=rs_zzxwcode.getString(3)%></option>
<%} rs_zzxwcode.close();%>
</select>
<span class="STYLE46">*</span></label></td>
</tr>
<td colspan="3" align="left" valign="bottom" bgcolor="#EEF9FD"><label>
<input name="J_userlb" type="text" id="J_userlb" disabled="disabled" value=<%=session.getAttribute("userlb")%>> ==>是不是这一行少了一个/?
</label></td>
如果不是的话 也应该是你的页面里面摸个地方少了个/ 或者 标签啥的
注意规范,td怎么还有div