function listMove(main, follow, hidetextbox, isBack, index) { if (index < 0) return; var o = undefined; var source; var distinct; var dddd; if (!isBack) { //使用getElementById在IE6中存在BUG source = $('#' main);// window.document.getElementById(main); distinct = $('#' follow); //window.document.getElementById(follow); } else { source = $('#' follow); // window.document.getElementById(follow); distinct = $('#' main); // window.document.getElementById(main); } var hid = $('#' hidetextbox)[0]; // document.getElementById(hidetextbox); if (index != undefined) { var op = "option:eq(" index ")"; source.find(op).each(function () { distinct.append(""); $(this).remove(); }); } else { source.find("option:selected").each(function () { $(this).remove(); distinct.append(""); }); } var str = ""; //遍历Listbox,取得选中项的值 $('#' main ' option').each(function () { str = $(this).val() ','; }); hid.value = str; }
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn