不明白你的意思,建议你在这个论坛里好好搜索一下,有很多人提过关于
<html:select>
的问题了。
<html:select>
的问题了。
解决方案 »
- java抽象问题求助
- JAVA 调用 .NET的WebServices,不能传递参数
- 一个简单的hibernate问题
- jsp容器竟然异常,有人知道吗
- Myeclipse开发JSF怎么没有h:outputText标签???
- 偶在使用jacob把word转化为xml时出现的异常,who can help me?
- 急急急急急急!!!delephi 能调用.class文件吗??也就是使用java的接口!如何作???
- 我只有文件名和文件路径,怎么把该文件上传到服务器上?
- 压力测试
- maven SSM项目 同样的写法在eclipse 可以运行访问 为什么到IDEA 上写 部署 访问什么都是404
- 下载:5.0.0 Alpha for Linux,请问这里的Alpha是什么意思?
- 请高手指点!!!
<html>
<script language="javascript">
function moveup(objselect)
{
for(var i=1;i<objselect.length;i++)
{
if(objselect.options[i].selected == true)
{
objoption = document.createElement("OPTION");
objoption.text=objselect.options[i-1].text;
objselect.options[i-1].text = objselect.options[i].text;
objselect.options[i].text = objoption.text;
objselect.options[i-1].selected=true;
objselect.options[i].selected=false;
}
}
}
function movedown(objselect)
{
for(var i=objselect.length-1;i>=0;i--)
{
if(objselect.options[i].selected == true)
{
objoption = document.createElement("OPTION");
objoption.text=objselect.options[i+1].text;
objselect.options[i+1].text = objselect.options[i].text;
objselect.options[i].text = objoption.text;
objselect.options[i+1].selected=true;
objselect.options[i].selected=false;
}
}
}
function selectchange(srcselect,objselect)
{
for(var i=0;i<srcselect.length;i++)
{
if(srcselect.options[i].selected == true)
{
objoption = document.createElement("OPTION");
objoption.text=srcselect.options[i].text;
srcselect.remove(i);
objselect.add(objoption);
i=i-1;
}
}
}
</script><body bgcolor="#cccccc">
<div align="center">
<table width="335" height="188" border="0">
<form>
<tr>
<td align="center" class="cellLabel"><font color="#0066FF">可选择的列</font></td>
<td align="center" > </td>
<td class="cellLabel"><div align="center"><font color="#0066FF">选定的列</font></div></td>
<td class="lightcell"> </td>
</tr>
<tr>
<td align="center" width="137" class="cellLabel"> <select id="srcselect" name="select1" size="10" style="width:100pt" multiple>
<option>南京</option>
<option>大连</option>
<option>北京</option>
<option>上海</option>
<option>天津</option>
<option>广州</option>
</select></td>
<td align="center" width="22" ><table width="100%" border="0">
<tr align="center">
<td><input type="button" value="left" onClick="selectchange(srcselect,objselect)">
</td>
</tr>
<tr>
<td height="36"><input type="button" value="right" onClick="selectchange(objselect,srcselect)"></td>
</tr>
</table></td>
<td width="133" class="cellLabel"><div align="center">
<select id="objselect" name="select2" size="10" style="width:100pt" multiple>
</select>
</div></td>
<td width="25" class="lightcell"> <div align="center">
<table width="20%" height="55" border="0">
<tr>
<td height="26"><div align="center"><input name="" type="button" value="up" onclick="moveup(objselect)"></div></td>
</tr>
<tr>
<td height="23"><div align="center"><input name="down" type="button" value="down" onClick="movedown(objselect)"></div></td>
</tr>
</table>
</div></td>
</tr>
</form>
</table>
</div>
</body>
</html>
property 就是你的select数据项的名字,必须填写,否则action里面如何获取输入的值
?