没找到怎么贴图,不好意思。就是左边一个列表框有几项内容,选中其中几项,点这个按钮>>把所选移到右边列表框。最后把右边列表框的内容更新到数据库,请问用javascript如何实现??
解决方案 »
- 一个关于IIS设置网页可播放flv和swf的问题
- 关于~/和../符号返回上级目录的问题。
- wcf 地址问题
- INSERT INTO 语句的语法错误
- 身份验证的问题(高手help me)
- IIS无法显示图片和CSS内容
- DataGrid问题~~~~~~~~~ 救命啊~~~~~~~~~~
- [注意加急]2004 大型项目人事招聘(C#)
- session 怎么传递不了呢!
- 在cs代码文件中(注意,不是页面的代码文件,是纯代码文件)session这样定义,为什么有错?
- datagrid里删除一条记录,跳出一个确定取消对话框,确定就执行删除,反之就回原页面,怎么实现?
- ExecuteNonQuery()返回受影响记录条数的严重问题
{
var addOption=document.createElement("option");
var index1;
if(document.Form1.lstAllUser.length==0)return(false);
index1=document.Form1.lstAllUser.selectedIndex;
if(index1<0)return(false);
addOption.text=document.Form1.lstAllUser.options(index1).text;
addOption.value=document.Form1.lstAllUser.value;
if(document.Form1.lstSelectUser.contains(addOption)) return false;
document.Form1.lstSelectUser.add(addOption);
document.Form1.txtID.value = document.Form1.txtID.value + addOption.value + ",";
document.Form1.txtName.value = document.Form1.txtName.value + addOption.text + ",";
document.Form1.lstAllUser.remove (index1);
}
function SelectAllUser()
{
for(index = document.Form1.lstAllUser.length -1 ;index >= 0 ; index --)
{
var addOption=document.createElement("option");
addOption.text=document.Form1.lstAllUser.options(index).text;
addOption.value=document.Form1.lstAllUser.options(index).value;
document.Form1.lstSelectUser.add(addOption);
document.Form1.txtID.value = document.Form1.txtID.value + addOption.value + ",";
document.Form1.txtName.value = document.Form1.txtName.value + addOption.text + ",";
document.Form1.lstAllUser.remove (index);
}
}
function UnSelectUser()
{
var addOption=document.createElement("option");
var index1;
if(document.Form1.lstSelectUser.length==0)return(false);
index1=document.Form1.lstSelectUser.selectedIndex;
if(index1<0)return(false);
addOption.text=document.Form1.lstSelectUser.options(index1).text;
addOption.value=document.Form1.lstSelectUser.value;
if(document.Form1.lstSelectUser.contains(addOption)) return false;
document.Form1.lstAllUser.add(addOption);
document.Form1.txtID.value = document.Form1.txtID.value.replace(addOption.value + ",","");
document.Form1.txtName.value = document.Form1.txtName.value.replace(addOption.text + ",","");
document.Form1.lstSelectUser.remove (index1);
}
function UnSelectAllUser()
{
for(index = document.Form1.lstSelectUser.length -1 ;index >= 0 ; index --)
{
var addOption=document.createElement("option");
addOption.text=document.Form1.lstSelectUser.options(index).text;
addOption.value=document.Form1.lstSelectUser.options(index).value;
document.Form1.lstAllUser.add(addOption);
document.Form1.txtID.value = document.Form1.txtID.value.replace(addOption.value + ",","");
document.Form1.txtName.value = document.Form1.txtName.value.replace(addOption.text + ",","");
document.Form1.lstSelectUser.remove (index);
}
}