数码资讯
Javascript实现无线电使用复选框,列表框,选择,请填写
复制代码代码如下所示: 列表测试 附注1:左右运动的选择 注:本页仅测试IE6 / firefox1.5.other浏览器或其他版本下不测试。 讲师 onclick=moveleftorright(document.frm.srcselect,文档。FRM。objselect)> 教学管理 超级管理
选购提示
关注价格、性能、续航、售后和真实使用场景,理性比较后再下单。
复制代码代码如下所示:
列表测试
附注1:左右运动的选择
注:本页仅测试IE6 / firefox1.5.other浏览器或其他版本下不测试。
<选择srcselect大小=6风格=字体大小:11pt;宽度:160px;身高:160px
多=多鼠标双击=moveleftorright(document.frm.srcselect,文档。FRM。objselect)>
讲师
onclick=moveleftorright(document.frm.srcselect,文档。FRM。objselect)>
<选择objselect大小=6风格=字体大小:11pt;宽度:160px;身高:160px
多=多鼠标双击=moveleftorright(document.frm.objselect,文档。FRM。srcselect)>
教学管理
超级管理员
移动
功能上(){
无功theobjoptions = document.frm.objselect.options;
对于(var i = 1;i < theobjoptions.length;i++){
如果我选择(theobjoptions { }!theobjoptions { 1 }我{选择)。
swapoptionproperties(theobjoptions {我},{ 1 }我theobjoptions);
}
}
}
函数向下移动(){
无功theobjoptions = document.frm.objselect.options;
对于(var i = theobjoptions.length - 2;我1;我--){
如果我选择(theobjoptions { }!theobjoptions {我+ 1 }。选择){
swapoptionproperties(theobjoptions {我},{我theobjoptions + 1 });
}
}
}
功能swapoptionproperties(选项,选择2){
无功tempstr = option1.value;
option1.value = option2.value;
option1.value = tempstr;
tempstr = option1.text;
option1.text = option2.text;
option2.text = tempstr;
tempstr = option1.selected;
option1.selected = option2.selected;
option2.selected = tempstr;
}
移动位置列表框
功能moveleftorright(从OBJ,toobj){
对于(var i = 0;i < fromobj.length;i++){
无功srcoption =从OBJ选项{我};
如果(srcoption。选择){
toobj.appendchild(srcoption);
我--;
}
}
}
列表测试
附注1:左右运动的选择
注:本页仅测试IE6 / firefox1.5.other浏览器或其他版本下不测试。
<选择srcselect大小=6风格=字体大小:11pt;宽度:160px;身高:160px
多=多鼠标双击=moveleftorright(document.frm.srcselect,文档。FRM。objselect)>
讲师
onclick=moveleftorright(document.frm.srcselect,文档。FRM。objselect)>
<选择objselect大小=6风格=字体大小:11pt;宽度:160px;身高:160px
多=多鼠标双击=moveleftorright(document.frm.objselect,文档。FRM。srcselect)>
教学管理
超级管理员
移动
功能上(){
无功theobjoptions = document.frm.objselect.options;
对于(var i = 1;i < theobjoptions.length;i++){
如果我选择(theobjoptions { }!theobjoptions { 1 }我{选择)。
swapoptionproperties(theobjoptions {我},{ 1 }我theobjoptions);
}
}
}
函数向下移动(){
无功theobjoptions = document.frm.objselect.options;
对于(var i = theobjoptions.length - 2;我1;我--){
如果我选择(theobjoptions { }!theobjoptions {我+ 1 }。选择){
swapoptionproperties(theobjoptions {我},{我theobjoptions + 1 });
}
}
}
功能swapoptionproperties(选项,选择2){
无功tempstr = option1.value;
option1.value = option2.value;
option1.value = tempstr;
tempstr = option1.text;
option1.text = option2.text;
option2.text = tempstr;
tempstr = option1.selected;
option1.selected = option2.selected;
option2.selected = tempstr;
}
移动位置列表框
功能moveleftorright(从OBJ,toobj){
对于(var i = 0;i < fromobj.length;i++){
无功srcoption =从OBJ选项{我};
如果(srcoption。选择){
toobj.appendchild(srcoption);
我--;
}
}
}
声明:本文内容用于数码产品信息整理与选购参考,具体价格、库存、售后政策以官方渠道和电商页面实时信息为准。