日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

字典表左右选择

發布時間:2023/11/29 编程问答 29 豆豆
生活随笔 收集整理的這篇文章主要介紹了 字典表左右选择 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>管理中心 - 添加新配送點 </title>
<meta name="robots" content="noindex, nofollow">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="./app/view/back/styles/general.css" rel="stylesheet" type="text/css" />
<link href="./app/view/back/styles/main.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="./app/view/back/js/shehe.js"></script>
<style type="text/css">
body{ background:#EEEEEE;margin:0; padding:0; font-family:"微軟雅黑", Arial, Helvetica, sans-serif; }
a{ color:#006600; text-decoration:none;}
a:hover{color:#990000;}
.top{ margin:5px auto; color:#990000; text-align:center;}
.info select{ border:1px #993300 solid; background:#FFFFFF;}
.info{ margin:5px; text-align:center;}
.info #show{ color:#3399FF; }
.bottom{ text-align:right; font-size:12px; color:#CCCCCC; width:1000px;}
</style>
<style>
button{
border:1px solid #ccc;
cursor:pointer;
display:block;
margin:auto;
position:relative;
top:100px;
}</style>


<script language="javascript">
function fun_select_addany(theform){
var i;
for (i=0;i<theform.s_county.length;i++){
if (theform.s_county.options[i].selected == true){
if (theform.s_county.options[i].text !=""){
theform['right_select[]'].options[theform['right_select[]'].length]=new Option(theform.s_county.options[i].text);
theform.s_county.options[i] =new Option("");
}
}
}
for (i=0;i<theform.s_county.length;i++){
if (theform.s_county.options[i].text ==""){theform.s_county.options.remove(i); i--;}
}
}

function fun_select_addall(theform){
var i;
for (i=0;i<theform.s_county.length;i++){
if (theform.s_county.options[i].text !=""){
theform['right_select[]'].options[theform['right_select[]'].length]=new Option(theform.s_county.options[i].text);
}
}
theform.s_county.length=0;
}

function fun_select_dltany(theform){
var i;
for (i=0;i<theform['right_select[]'].length;i++){
if (theform['right_select[]'].options[i].selected == true){
if (theform['right_select[]'].options[i].text !=""){
theform.s_county.options[theform.s_county.length]=new Option(theform['right_select[]'].options[i].text);
theform['right_select[]'].options[i] =new Option("");
}
}
}
for (i=0;i<theform['right_select[]'].length;i++){
if (theform['right_select[]'].options[i].text ==""){theform['right_select[]'].options.remove(i);i--;}
}
}
function fun(){
var right_sel=document.getElementById("all_menu_list");
var ops = right_sel.getElementsByTagName('option') ;
console.log(ops);
console.log(ops.length);
for(var i=0; i<=ops.length; i++) {
ops[i].selected = true;
}
alert(right_sel);
}
function fun_select_dltall(theform){
var i;
for (i=0;i<theform['right_select[]'].length;i++){
if (theform['right_select[]'].options[i].text !=""){
theform.s_county.options[theform.s_county.length]=new Option(theform['right_select[]'].options[i].text);
}
}
theform['right_select[]'].length=0;
}
window.onload = function() {
_init_area();
}
</script>
</head>

<body>

<h1>
<span class="action-span"><a href="index.php?p=back&c=Peisongdian&a=listAll">查看全部配送點
</a></span>
<span class="action-span1"><a href="index.php?act=main">管理中心</a> </span><span id="search_id" class="action-span1"> - 添加新配送點</span>

</h1>
<!-- start goods form -->
<div class="tab-div">
<!-- tab bar -->
<div id="tabbar-div">
<p>
<span class="tab-front" id="general-tab">通用信息</span>
<span class="tab-back" id="detail-tab">詳細描述</span>
<span class="tab-back" id="mix-tab">其他信息</span>
<span class="tab-back" id="gallery-tab">商品相冊</span>
</p>
</div>

<!-- tab body -->
<form action="xx.php" method="post" name="myform" >
<!-- 第一個選的 -->
<table width="90%" id="general-table" align="center" border="0">

<!-- 這里開始 -->
<tr >
<td></td>
<td>
<select id="s_province" name="s_province"></select>&nbsp;&nbsp;
<select id="s_city" name="s_city" ></select>&nbsp;&nbsp;
</td>
</tr>
<tr>
<td></td>
<td align="center">

<div style="width: 150px; height: 190px ;float: left;">
<select multiple="true" ; style="width:150px; height: 180px;"id='s_county' name='s_county' >
</select>
</div>
<div style="width: 80px;float: left;">
<input language="javascript" name="btn_select_addany" onClick="fun_select_addany(document.myform)" type=button value="添加一個">
<input language="javascript" name="btn_select_addall" onClick="fun_select_addall(document.myform)" type=button value="添加全部">
<input language="javascript" name="btn_select_dltany" onClick="fun_select_dltany(document.myform)" type=button value="刪除一個">
<input language="javascript" name="btn_select_dltall" onClick="fun_select_dltall(document.myform)" type=button value="刪除全部">
</div>
<script src="http://sandbox.runjs.cn/uploads/rs/267/g3ugugjp/area.js" type="text/javascript"></script>
<div style="width:150px; height: 190px;float: left;" id="heh">
<select id="all_menu_list" name="right_select[]" size="15" multiple="true" style="width:150px; height: 180px" >
</select>
</div>

</td>

</table>
<div class="button-div">
<input type="submit" value=" 確定 " class="button" οnclick="fun()" />
</div>
</form>
</div>

</body>
</html>

轉載于:https://www.cnblogs.com/huangf714/p/5908060.html

總結

以上是生活随笔為你收集整理的字典表左右选择的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。