-1

I would want the function to detect whether there is text in a text field typed in by a user. Not necessarily keyup. I wouldn't want it to fire every time I type in the field. I would want it to detect whether there is text in the field or not.

1
  • 2
    Do you mean the input event? Commented Jun 1, 2016 at 15:55

2 Answers 2

1

html <input> tags including type='text' support the onchange event. The onchange event occurs when the value of an element has been changed.

I wouldn't want it to fire every time I type in the field.

in this case, when exactly would you want it to be triggered? onblur event occurs when an object loses focus.

Sign up to request clarification or add additional context in comments.

1 Comment

for me it's the proper way wait that the element have really change and after check the lenght or the value to determine if it's empty or filled
0

You have 2 another events like 'blur' or 'focus'

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.