java.util.Enumeration mystr=request.getParameterNames();
int i;
try{
while(mystr.hasMoreElements()){
String e=mystr.nextElement().toString();
if(e.indexOf("group")==-1) {
String[] add=request.getParameterValues(e);
for(i=0;i<address.length;i++) myaddr.addaddr(add[i]);
}
}
}catch(Exception e){
System.err.println(e.getMessage());
}
int i;
try{
while(mystr.hasMoreElements()){
String e=mystr.nextElement().toString();
if(e.indexOf("group")==-1) {
String[] add=request.getParameterValues(e);
for(i=0;i<address.length;i++) myaddr.addaddr(add[i]);
}
}
}catch(Exception e){
System.err.println(e.getMessage());
}
解决方案 »
- hibernate多对一查询问题
- :brno 这个值取自哪里的呢,是不是只有是对应着map里的字段就行呢?希望大家能帮我一下忙,O(∩_∩)O谢谢
- IBM提出我们的系统有安全隐患,不知如何修改……
- SQL分页与Oracle分页的疑问?
- 求一个关于文件、目录路径验证用的JS正则表达式
- 命令行参数问题!!!!!!!!!!!!
- 各位侠侠,帮帮小弟一个忙!!!!!!!!!!
- maven构建的web项目修改jsp后必须要package才会生效吗?
- 用户成功登陆后如何在jsp页面中断开与服务器的连接
- 急 session過期問題,在我的电脑url栏输入ip访问(session控制的值丢失)与在ie地址栏输入ip访问我的web(session正常) .
- HttpSession是Interface,而且我也还没找着哪个类实现了它,为什么它能实例化对象呢?
- 请问怎么在javamail中给多个人抄送mail?
<%@ page contentType="text/html;charset=gb2312"%>
<%@ page language="java"%>
<%@ page import="java.sql.*"%>
<jsp:useBean id="show" scope="page" class="com.tomato.forumDB.forumDB"/>
<html>
<head>
<title>顶级栏目次序调整</title>
<SCRIPT language=javascript>
function mysubmit(form)
{
with(form){
selectValue.value=''
for(i=1;i<s1.length;i++)
selectValue.value+=s1.options[i].value+','
}
}
function moveUp(obj)
{
with (obj){
if(selectedIndex==1){
options[length]=new Option(options[1].text,options[1].value)
options[1]=null
selectedIndex=length-1
}
else if(selectedIndex>1) moveG(obj,-1)
}
}
function moveDown(obj)
{
with (obj){
if(selectedIndex==length-1){
var otext=options[selectedIndex].text
var ovalue=options[selectedIndex].value
for(i=selectedIndex; i>1; i--){
options[i].text=options[i-1].text
options[i].value=options[i-1].value
}
options[i].text=otext
options[i].value=ovalue
selectedIndex=1
}
else if(selectedIndex>0 && selectedIndex<length-1) moveG(obj,+1)
}
}
function moveG(obj,offset)
{
with (obj){
desIndex=selectedIndex+offset
var otext=options[desIndex].text
var ovalue=options[desIndex].value
options[desIndex].text=options[selectedIndex].text
options[desIndex].value=options[selectedIndex].value
options[selectedIndex].text=otext
options[selectedIndex].value=ovalue
selectedIndex=desIndex
}
}
</SCRIPT>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel=stylesheet href="styles.css" type=text/css>
</head><body bgcolor="#FFFFFF" text="#000000" topmargin="0" marginheight="0">
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td bgcolor="#F7F7F7">
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="txt">
<tr>
<td height="19">顶级栏目管理 </td>
</tr>
</table>
</td>
</tr>
<tr>
<td height="15">
<form method="post" name=shezhi onsubmit=mysubmit(this) action="/servlet/com.tomato.servlets.subject.getNewOrder">
<table width="100%" border="0" cellspacing="1" cellpadding="1" bgcolor="#33CCFF">
<tr>
<td width="30%" bgcolor="#E8F8FF">
<div align="center">
<select name="s1" size="9">
<option value="-1">-----------------</option>
<%
ResultSet rs=show.executeQuery("select * from class order by orderby");
while(rs.next())
{
%>
<option value="<%=rs.getString("ztid")%>"><%=rs.getString("class")%></option>
<%
}
show.destroy();
%>
</select>
</div>
</td>
<td width="70%" bgcolor="#E8F8FF">
<input type="button" onclick=moveUp(this.form.s1) value="∧">
<input name=selectValue type=hidden value=with(this)>
<input
name=netColumnid type=hidden value=15>
<input name=netMagazineid
type=hidden value=1>
<input name=totalNum type=hidden value=1>
<br>
<br>
<input type="button" onclick=moveDown(this.form.s1) value="∨">
<br>
<br>
<input type="submit" name="Submit" value="保存">
<br>
<br>
<input type="button" value="关闭窗口" onclick="window.close();">
</td>
</tr>
</table>
</form>
</td>
</tr>
</table>
</body>
</html>以上是我的程序,我自己来结了吧