php页面中,现要实现 左边一个框,框中有很多记录,要移到右边的框,并移完后,右边是要用的记录,
这一功能如何实现 thanks
这一功能如何实现 thanks
解决方案 »
- js如何预处理搜索框的值,防止sql注入
- javascript怎么把二进制数据用<img>标签呈现到页面中?
- 这几个坐标值都是什么意思啊?
- 请问用javasript可以得到表单提交的数据吗?
- 看个jquery写法,有什么问题?
- 用mozilla,firefox浏览器,怎样实现类似IE的showModalDialog功能?
- 是一个关于定位的问题,我现在一个页面很长,其中有很多单选按钮,我写了脚本可是还是定位不了.谢谢(急)
- 我想让用户可多选择一些文件,每次选择的文件都放到listbox内,然后,按确定按钮一次性上传所有文件,怎么实现?选择文件对话框和listbox
- Html中用table来实现Data Grid的功能,高手请进!!!!!!!
- IE5.0和IE5.5中的問題,急!
- 多选日期的日历问题,选择多个日期后得不到日期。急急急急
- HTC 和 JAVASCRIPT 的问题
<option>可以选择的水果</option>
<option>--------------</option>
<option value="大香蕉">香蕉</option>
<option value="大苹果">苹果</option>
<option value="大橘子">橘子</option>
<option value="大火龙果">火龙果</option>
</select><input type="button" value=" >> " onclick="add()">
<input type="button" value=" << " onclick="del()"><select id="select2" size="20">
<option>可以选择的水果</option>
<option>--------------</option>
</select><script language="javascript">
function add(){
var select1 = document.getElementById("select1");
var select2 = document.getElementById("select2");
var select_index = select1.selectedIndex; if(select_index > 1){
var option = document.createElement("option"); //第一种
// option.value = select1.options[select_index].value;
// option.innerHTML = select1.options[select_index].innerHTML;
// select2.appendChild(option); select2.options.add(new Option(select1.options[select_index].innerHTML, select1.options[select_index].value));//第二种 select1.options[select_index] = null;
}
}function del(){
var select1 = document.getElementById("select1");
var select2 = document.getElementById("select2");
var select_index = select2.selectedIndex;
if(select_index > 1){
var option = document.createElement("option"); //第一种
// option.value = select2.options[select_index].value;
// option.innerHTML = select2.options[select_index].innerHTML;
// select1.appendChild(option); select1.options.add(new Option(select2.options[select_index].innerHTML, select2.options[select_index].value));//第二种 select2.options[select_index] = null;
}
}
</script>
<script type="text/javascript">
$(function() {
$("#Button1").click(function() {
$selceted = $("#se1 option:selected");
$selceted.appendTo("#se2"); }) })
$(function() {
$("#Button2").click(function() {
$selceted = $("#se2 option:selected");
$selceted.appendTo("#se1"); }) })
$(function() {
$("#Button3").click(function() {
$select = $("#se1 option").attr();
$select.appendTo("#se2")
})
})
$(function() {
$("#Button4").click(function() {
$select = $("#se2 option").attr();
$select.appendTo("#se1")
})
})</script>JQERY的插件导入一下,四个按钮 第一个→移 2是←移 三是全部移动到→ 四全部移动到←边
我才写过的。你试试
<option>可以选择的水果</option>
<option>--------------</option>
<option value="大香蕉">香蕉</option>
<option value="大苹果">苹果</option>
<option value="大橘子">橘子</option>
<option value="大火龙果">火龙果</option>
</select><input type="button" value=" >> " onclick="add()">
<input type="button" value=" << " onclick="del()"><select id="select2" size="20">
<option>可以选择的水果</option>
<option>--------------</option>
</select><script language="javascript">
var arr = new Array();
function add(){
var select1 = document.getElementById("select1");
var select2 = document.getElementById("select2");
var select_index = select1.selectedIndex;if(select_index > 1){
var option = document.createElement("option");//第一种
// option.value = select1.options[select_index].value;
// option.innerHTML = select1.options[select_index].innerHTML;
// select2.appendChild(option);select2.options.add(new Option(select1.options[select_index].innerHTML, select1.options[select_index].value));//第二种
arr[arr.length] = select1.options[select_index].value;alert(arr);
select1.options[select_index] = null;
}
}function del(){
var select1 = document.getElementById("select1");
var select2 = document.getElementById("select2");
var select_index = select2.selectedIndex;if(select_index > 1){
var option = document.createElement("option");//第一种
// option.value = select2.options[select_index].value;
// option.innerHTML = select2.options[select_index].innerHTML;
// select1.appendChild(option);select1.options.add(new Option(select2.options[select_index].innerHTML, select2.options[select_index].value));//第二种
arr.length = [arr.length - 1];
alert(arr);
select2.options[select_index] = null;
}
}
</script>
从左边移到右边后,
我再用submit 提交时,怎么得到select2中的值,
从左边移到右边后,
我再用submit 提交时,怎么得到select2中的值,