search

Home  >  Q&A  >  body text

javascript - How to get the auto-fill value of input

input How to get the automatically filled value? The current automatically filled value cannot be verified.
Verification error message is wrong, and then it needs to be verified when selecting automatic filling.


When submitting at the beginning, it prompts that the mobile phone number cannot be empty
After automatic selection, focus focusin change blur is not triggered

You need to click the mouse again to trigger the blur event

大家讲道理大家讲道理2826 days ago697

reply all(6)I'll reply

  • PHP中文网

    PHP中文网2017-05-16 13:27:57

    How did you verify it?

    reply
    0
  • PHP中文网

    PHP中文网2017-05-16 13:27:57

    Use the onkeyup event natively

    reply
    0
  • 巴扎黑

    巴扎黑2017-05-16 13:27:57

    https://github.com/tbosch/aut...

    reply
    0
  • 迷茫

    迷茫2017-05-16 13:27:57

    onchange event should meet your needs

    reply
    0
  • 滿天的星座

    滿天的星座2017-05-16 13:27:57

    onchange event will be triggered after the focus leaves the Input, and then get the value

    reply
    0
  • 迷茫

    迷茫2017-05-16 13:27:57

    The value in placeholder? document.getElementById('XXX').getAttribute('placeholder');
    If value is worth document.getElementById('XXX').getAttribute('value');
    onchange="getDefault(this)" can also be used

    reply
    0
  • Cancelreply