<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<script src="jquery-latest.js" type="text/javascript"></script>
</head>
<script type="text/javascript">
$(function(){
$("#s1 option:first,#s2 option:first").attr("selected",true);
$("#s1").dblclick(function(){
var alloptions = $("#s1 option");
var so = $("#s1 option:selected");
if(so === null || so == "undefined"){
return;
}
try{
var a = (so.get(so.length-1).index == alloptions.length-1)? so.prev().attr("selected",true):so.next().attr("selected",true);
}catch(e){
return;
}
$("#s2").append(so);
});
$("#s2").dblclick(function(){
var alloptions = $("#s2 option");
var so = $("#s2 option:selected");
if(so === null || so == "undefined"){
return;
}
try{
var a = (so.get(so.length-1).index == alloptions.length-1)? so.prev().attr("selected",true):so.next().attr("selected",true);
}catch(e){
return;
}
$("#s1").append(so);
});
$("#add").click(function(){
var alloptions = $("#s1 option");
var so = $("#s1 option:selected");
if(alloptions.length-1>0){
var a = (so.get(so.length-1).index == alloptions.length-1)? so.prev().attr("selected",true):so.next().attr("selected",true);
}
$("#s2").append(so);
});
$("#remove").click(function(){
var alloptions = $("#s2 option");
var so = $("#s2 option:selected");
if(alloptions.length-1>0){
var a = (so.get(so.length-1).index == alloptions.length-1)? so.prev().attr("selected",true):so.next().attr("selected",true);
}
$("#s1").append(so);
});
$("#addall").click(function(){
$("#s2").append($("#s1 option").attr("selected",true));
});
$("#removeall").click(function(){
$("#s1").append($("#s2 option").attr("selected",true));
});
});
function selectall()
{
var sel;
sel=document.getElementById("s2");
for(var i=0;i<sel.length;i++){
sel.options[i].selected=true;
}
}
function check(s) {//判断是否为字母
var regexp = /^[a-zA-Z]+$/;
if(regexp.test(s)) return true ;
else false ;
}
function flg() {
var f1 = document.getElementById("f").value;
if(f1!=""){
var len = document.getElementById("s1").options.length;
if(check(f1)){
var patrn=new RegExp(".*?"+f1.toLowerCase()+".*?");//转化为小写//转化为大写toUpperCase( )
for ( var i = 0; i < len; i++) {
var str=myConvertToLower(document.getElementById("s1").options[i].text);//小写
if(patrn.exec(str)){
document.getElementById("s1").options[i].selected = true;
}else{
document.getElementById("s1").options[i].selected = false;
}
}
}else{
var patrn=new RegExp(".*?"+f1+".*?");
for ( var i = 0; i < len; i++) {
if(patrn.exec(document.getElementById("s1").options[i].text)){
document.getElementById("s1").options[i].selected = true;
}else{
document.getElementById("s1").options[i].selected = false;
}
}
}
}
}
</script>
<base target="_self">
<body>
<form theme="simple" action="saveClearSettingAccessStore" method="post" name="form">
<hr color=red width="99%">
<table width="100%" border="0" align="center" cellpadding="2" cellspacing="0" class="table">
<tr >
<td width="45%" height="200px" align="center">
<div align="left">
未授权
:模糊查询
<input name="name" id="f" onkeyup="flg()"/>
</div>
<div align="left">
<select id="s1" multiple="multiple" style="width:350px;height:190px;">
<option value="1" />
j
</option>
<option value="2" />
ll试2
</option>
<option value="3" />
mm试3
</option>
<option value="4" />
nn试4
</option>
<option value="5" />
北京
</option>
<option value="6" />
上海
</option>
<option value="7" />
添加
</option>
<option value="8" />
美国 </option>
<option value="9" />
测
</option>
<option value="10" />
aaaa试10
</option>
<option value="11" />
华夏
</option>
<option value="12" />
台湾
</option>
<option value="13" />
河南
</option>
<option value="14" />
河北
</option>
<option value="15" />
f试5
</option>
<option value="16" />
g试6
</option>
<option value="17" />
h试7
</option>
<option value="18" />
d试8
</option>
<option value="19" />
x
</option>
<option value="20" />
b
</option>
<option value="6000000000001000362">
竹塘
(0107)
</option>
<option value="6000000000001000121">
厦门咖啡厅
(0125001)
</option>
<option value="6000000000001000363">
马兰山
(0402)
</option>
<option value="6000000000001000364">
四方坪
(0606)
</option>
<option value="6000000000001000365">
星沙店
(0706)
</option>
<option value="6000000000001000601">
10088test
(10088)
</option>
<option value="6000000000001000342">
测试门店ERP
(8888)
</option>
<option value="6000000000000001225">
新竹中正店
(A010011)
</option>
<option value="6000000000000001244">
新竹民權店
(A010020)
</option>
<option value="6000000000000001228">
新竹光華店
(A010031)
</option>
<option value="6000000000000001227">
新竹遠百店
(A010041)
</option>
<option value="6000000000000001152">
新竹竹科店
(A010049)
</option>
<option value="6000000000000001376">
新竹力行店
(A010051)
</option>
<option value="6000000000000001230">
新竹中山店
(A010060)
</option>
<option value="6000000000000000745">
台北西門店
(A011840)
</option>
<option value="6000000000000000769">
台北榮星店
(A011850)
</option>
<option value="6000000000000000062">
台北臨沂店
(A011860)
</option>
<option value="6000000000000000793">
三重強和店
(A011870)
</option>
<option value="6000000000000001084">
三重三和店
(A011880)
</option>
<option value="6000000000000000788">
三重中正店
(A011890)
</option>
<option value="6000000000000001041">
三重中華店
(A011900)
</option>
<option value="6000000000000000701">
基隆樂一店
(A012700)
</option>
<option value="6000000000000000524">
基隆仁二店
(A012701)
</option>
- 1
- 2
- 3
- 4
- 5
- 6
前往页