Home > Web Front-end > JS Tutorial > body text

JavaScript implements two select drop-down box options to move left and right

不言
Release: 2018-03-30 11:20:23
Original
2083 people have browsed it

This article introduces JavaScript code to implement two select drop-down box options to move left and right. Interested students can refer to this article

I have nothing to do today and I wrote a drop-down with two select using js. A small program that can move elements between boxes. I have just started learning JavaScript and there are still many areas for optimization.

Javascript code

The above is the javascript code, and the following is the html plus css code.
The code is as follows

Html code

The code is as follows

Untitled Document

.select_move { margin:0px auto; width:206px; height:140px; margin-top:300px;}

.select_move_1 { float:left;}

.select_move_2 { float:left; }

.select_move_3 { float:left;}

< ;body>

 

   

                                                 first"size="10"id="first"multiple="multiple">

                                                                                                            "Toyota">Toyota

                                                                                                                                                        < /option> #                                                                                                             

# & lt; inputtype = "Button" Value = "=== & GT;" OnClick = "Moveall ()" /& GT; & LT;

& LT; "value="<------"onclick="moveLeft()"/>

                                                                                   "onclick="moveAllLeft()"/>

                                                                                                           id="secend"multiple="multiple">

                                                                          # ​

##

Related recommendations:

Sample code sharing using JavaScript to implement two select drop-down box options to move left and right

The above is the detailed content of JavaScript implements two select drop-down box options to move left and right. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!