selectPerson.js
资源名称:NetOffice.rar [点击查看]
上传用户:guhaomin
上传日期:2007-06-10
资源大小:23203k
文件大小:2k
源码类别:
电子政务应用
开发平台:
Java
- function addConfirmer()
- {
- myform = document.forms[0];
- //var depText;
- // for( i =0; i< myform.deptId.options.length; i++ )
- // {
- // if( myform.deptId.options(i).selected= true )
- // depText = myform.deptId.options(i).text;
- // }
- if ( myform.selectableIDList.value == '' )
- {
- alert('请选择执行人!');
- return false;
- }
- for (i = 0; i < myform.selectableIDList.options.length; i++)
- {
- if ( myform.selectableIDList.options(i).selected == true )
- {
- j = myform.selectedIDList.options.length - 1;
- for (; j >= 0; j--)
- {
- if (myform.selectableIDList.item(i).value == myform.selectedIDList.item(j).value)
- {
- break;
- }
- }
- if ( j < 0 )
- {
- value = myform.selectableIDList.item( i ).value;
- // + ";"
- // + myform.selectableIDList.item(i).text
- // +";"
- // + depText;
- text = myform.selectableIDList.item(i).text;
- newOpt = new Option( text , value );
- myform.selectedIDList.add(newOpt);
- }
- }
- }
- }
- function remove()
- {
- myform = document.forms[0];
- myindex = -1;
- for ( i = myform.selectedIDList.options.length - 1; i > myindex; i--)
- {
- if ( myform.selectedIDList.options(i).selected == true)
- {
- myform.selectedIDList.remove(i);
- }
- }
- }
- function checkAll( selObj )
- {
- for ( var i = 0; i < selObj.options.length; i++ )
- selObj.options[i].selected = true;
- }