0
0

More than 1 year has passed since last update.

javascript演習 〜10日目/30日

Posted at

覚えたこと

e.shiftKey, ctrlKey, altKey

checkbox.addEventListener('click', function(e){
  console.log(e.shiftKey)
)

thisの使い方、A = !Aとか

function handleCheck(e){
    if(e.shiftKey && this.checked){
      checkboxes.forEach(checkbox => {
        if((checkbox === this || checkbox === lastChecked) && lastChecked){
          inBetween = !inBetween;
        }
        if (inBetween){
          checkbox.checked = true;
        }
      })
    }    
    lastChecked = this;
  }
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0