
- Forum
- Programming Talk
- PHP
- Want to know the difference
Want to know the difference
This is a discussion on Want to know the difference within the PHP forums, part of the Programming Talk category; What is the difference between onkeyup and onchange events in PHP? If someone could give a brief explanation I could ...
-
03-01-2007, 10:14 AM #1
- Join Date
- Apr 2006
- Answers
- 124
Want to know the difference
What is the difference between onkeyup and onchange events in PHP? If someone could give a brief explanation I could get a clear view on this concept
-
ONKEYUP event is used for the below scenario:
As a user types into a textfield, another field generates a new number to reflect each additional letter. For example, "c" yields 1, "ca" yields 3 and "cat" regenerates the number field to, say, 9. The user sees this update as he types in his string.
-
ONKEYUP event is used for the below scenario:
Pasting doesn't trigger the ONKEYUP event. Were we to use ONCHANGE, we'd lose the letter-by-letter update-and-show-number feature. That's because ONCHANGE only gets the input once the entire string is entered.
-
Sponsored Ads

Reply With Quote





