我这个要在一个页面中显示,不能弄几个页面分别SUBMIT的
解决方案 »
- 关于oracle数据库的问题,帮忙看看哪错了。。。
- web2.0网站建设技术交流
- mysql 设置 手动 COMMIT 的语句!
- 为什么用jsp做的网站这么少?
- 学习jsp过程中真正遇到了找不到答案的问题,快2个星期了,问题还是没有解决,求教高手!!
- 关于List的问题,高分赠送(100分)
- spring mvc获取表单提交的对象
- 在线图片设计合成 ,类似美图秀秀在线版的
- 极为奇怪得中文乱码问题,再网上找了很多资料都不行请各位大侠帮忙!!!!!!高分相赠!!!!!!!!!
- 为何jbuilder8 的注册机无法运行?
- Jfree生成的图片上的中文在Unix 显示方框,急!!!
- 请问一个jsp服务器端程序生成的文件怎么能确定它和网页在一个目录下啊,然后想把这个文件下载,怎么实现啊
http://community.csdn.net/Expert/topic/4012/4012801.xml?temp=.6797907
var onecount;
onecount=0;
subcat = new Array();
<%
int count = 0;
while(rs.next()){
%>
subcat[<%=count%>] = new Array("<%=rs.getString("xm")%>","<%=rs.getString("xh")%>","<%=rs.getInt("bid")%>");
<%
count++;
}
rs.close();
%>
onecount=<%=count%>;
<!--决定select显示的函数-->
function changelocation(locationid)
{
document.myform.NclassId.length = 0; var locationid=locationid;
var i;
for (i=0;i < onecount; i++)
{
if (subcat[i][2] == locationid)
{
document.myform.NclassId.options[document.myform.NclassId.length] = new Option(subcat[i][0], subcat[i][1]);
}
}
}
</script> <FORM method="POST" name="myform" action="in_message.jsp" onSubmit="return CheckForm();">
<TR>
<TD bgcolor="#FFFFFF"><p align="center">
</p>
<table width="469" border="0" align="center">
<tr>
<th width="463" background="Images/techer_table.gif" scope="col"><p class="style1">教 师 留言</p> </th>
</tr>
<tr>
<th scope="row"><p> </p>
<p>题目:
<input name="title" type="text" id="title" size="30">
</p>
<p align="right" class="style3"> (最多50字符)</p></th>
</tr>
<tr>
<th scope="row"><p> </p>
<p>内容:
<textarea name="context" cols="30" rows="5" id="textarea"></textarea>
</p>
<p align="right"><span class="style3">(最多100字符)</span></p></th>
</tr>
<tr>
<th scope="row"><p> </p>
<p>留言:
<input name="type" type="radio" value="0" checked>
评语:
<input type="radio" name="type" value="1">
</p></th>
</tr>
<tr>
<th scope="row"><p> </p>
<p>班级:
<select name="classId" onChange="changelocation(document.myform.classId.options[document.myform.classId.selectedIndex].value)" size="1">
<option value="value" selected>==请选您代的班级==</option>
<%
//从teacher,xs,banji 三表中获得此教师所带的班级
String c_stu="select * from java.zhuanye ,java.banji,java.nianji where java.banji.zid=java.zhuanye.zid and java.zhuanye.nid=java.nianji.nid and java.zhuanye.zid=any( select distinct zid from java.banji where java.banji.bid=any(select distinct bid from java.xs where jsh='"+session.getValue("jsh")+"')) and java.zhuanye.nid=any(select distinct nid from java.zhuanye where zid=any(select zid from java.banji where java.banji.bid=any(select distinct bid from java.xs where jsh='"+session.getValue("jsh")+"'))) " ;
ResultSet rs2=a.executeQuery(c_stu);
while (rs2.next()) { //
%>
<option value="<%= rs2.getInt("bid")%>"> <%=rs2.getString("nj")+rs2.getString("zym")+rs2.getString("bjm")%></option>
<%
}
rs2.close();
a.closestatement();
a.closemyconn();
%>
</select>
</p></th>
</tr>
<tr>
<th scope="row"><p> </p>
<p>收件人:
<SELECT name="NclassId">
<option selected>==请选学生==</option>
</SELECT>
</p></th>
</tr>
<tr>
<th height="33" scope="row">
<p> </p>
<p>
<input type="submit" name="Submit" value="提交留言">
</p>
<p> </p></th>
</tr>
<tr>
<th height="25" background="Images/techer_table.gif" scope="row"> </th>
</tr>
</table>
</FORM>
但是这种方法 javascript的代码量 实在太多