开发者

Recursive issues

When I have two text fields which listen to change event from one to another, it causes me an error saying too much recursion.开发者_JAVA技巧 Anyone has good solution?


well you can hold a flag that holds the identity of the true event dispatcher. and break the event triggering if it matches.


You added an onchange event listener on both text fields; problem is, changing one text will trigger a change one the other field, which would trigger the onchange result for the first one, etc., resulting in an infinite loop.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜