Jump to content

Alexandr37

User
  • Posts

    56
  • Joined

  • Last visited

  • Days Won

    3

Posts posted by Alexandr37

  1. let isFirstInputEvent = true;
    let valueLength = 0;
    
    const input = document.querySelector('input');
    
    function callback(value) {
      console.log(value);
    }
    
    input.addEventListener('input', function() {
      let newValueLength = this.value.length;
      if (valueLength !== newValueLength && isFirstInputEvent) {
        callback('First input event');
        isFirstInputEvent = false;
      }
    });
    
    input.addEventListener('blur', function() {
      valueLength = this.value.length;
      isFirstInputEvent = true;
    });

     

  2. Хотел бы поинтересоваться у людей, активно занимающихся коммерческой версткой - какие сейчас наиболее частые пожелания заказчиков по поддержке браузеров? Например, просят ли поддержку opera mini или uc browser для андроид?

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. See more about our Guidelines and Privacy Policy