123

Pen Settings

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation

     

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              table.item-picker
 tr
  th 未加入功能清單
  th
  th 已加入功能清單
 tr
  td
   select(size="6" name="source1").pick-list
    option(value="0") 平台資訊審核
    option(value="1") 手續費審核
    option(value="2") 使用者管理
    option(value="3") 角色管理
  td
   button.add →
   br
   button.delete ←
  td
   select(size="6" name="target1").pick-list
    option(value="4") 平台資訊設定
    option(value="5") 手續費設定
    option(value="6") 顧客約定管理
            
          
!
            
              $dark: #439E96
$turquoise: #50BBB6
$light: #E7F2F1
$black: #596D6C
$gray: #CCE0DE

*
 // border: 1px solid #000

// .iten-picker
//  overflow: auto
 
.add,.deduct
 display: block


 
table
 margin-top: 100px
 margin-right: auto
 margin-left: auto
 text-align: center
 
th
 color: $turquoise
 font-size: 16px
td
 select
  width: 150px
  font-size: 14px
  color: $black
  border-radius: 3px
  border-style: dashed
  &:focus
   outline: none
   box-shadow: 0px 1px 10px 0px #cce0de
  option
   padding: 2px 10px
   transition: color 0.5s
   &:checked
    background: $gray linear-gradient(0deg, $gray 0%, $gray 100%)
   &:hover
    color: $turquoise
  &:focus
   option
    &:checked
     background: $turquoise linear-gradient($turquoise 0%, $turquoise 100%)
     color: #fff
    
button
 transition-duration: 0.5s
 height: 30px
 width: 30px
 border-radius: 100%
 text-align: center
 border-color: $gray
 color: $turquoise
 outline: none
 
 &:hover
  background-color: $turquoise
  color: #fff
  border-color: $turquoise

            
          
!
            
              // keep

const sourceItem=document.querySelector("select[name='source1']");
const targetItem=document.querySelector("select[name='target1']");
const addbtn=document.querySelector(".add");
const deletebtn=document.querySelector(".delete");

//memo index
addbtn.addEventListener("click", function(){
 // sourceItem.focus();
 const theItem=sourceItem.options[sourceItem.selectedIndex]
 // console.log(theItem);
 //memo memo
 if(theItem){
  sourceItem.removeChild(theItem);
  targetItem.appendChild(theItem);
 }
 
 
});

deletebtn.addEventListener("click", function(){
 // targetItem.focus();
 const theItem=targetItem.options[targetItem.selectedIndex]
 //memo memo 
 if(theItem){
   targetItem.removeChild(theItem);
   sourceItem.appendChild(theItem);
 }

 
});





            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.

Console