actionForm 你是怎么配置的?
解决方案 »
- 关于instanceof的用法,谷歌过了,仍有疑问
- 怎么找到相应的代码块?
- 谁来帮我看看这个错误。谢谢
- 关于Struts的验证问题
- 【算法讨论】
- 本公司业务需要现急招熟悉java(j2ee\ejb)和C/C++人才,有意者请将简历发到[email protected].薪水非常有竞争力。
- jsp连接数据库出错,请大家帮帮忙看看这是什么错误类型!
- 什么地方可以下载web services toolkit
- .net想转java求指点!
- 求大牛 这主要是那的问题
- 新手提问:关于struts+freemarker的问题?
- 关于object is not an instance of declaring class的问题
{
var IsCreate = true;
var theIndex = SourceSelect.selectedIndex;
var theLength = SourceSelect.length ;
if (theIndex == -1 ) //如果源Select为空的话,则退出过程
return false;
while (IsCreate) //添加到目的Select循环
{
theValue = SourceSelect.options[theIndex].text; //得到所选择的文本
TargetSelect.options.add(new Option(theValue)); //目的Select增加一个文本
theIndex = theIndex + 1; //如果是选择多列的话,对下一个进行处理
if (theIndex == theLength) //theLength 如果是4的话,则theIndex应该是3,
{ //如果两者想等的话,则源Select多了一个值,
IsCreate = false; //所以需要退出循环
break;
}
if (SourceSelect.options[theIndex].selected == false)//如果没有被选择的话,则退出循环
{
IsCreate = false;
}
}
while (IsCreate == false) //删除源select循环
{
SecIndex = SourceSelect.selectedIndex; //动态得到被选择的索引
theLength = SourceSelect.length ; //动态得到Select的长度
SourceSelect.remove(SecIndex); //删除指定索引的元素
if (theLength == 1) //表示最后一个元素已删除,
return false; //源select空了,退出循环
if (theLength == SecIndex + 1) //表示多选的已全部删掉,退出循环
return false;
if (SourceSelect.options[SecIndex].selected == false)
{
IsCreate = true;
}
}
}