Google chrome causing infinite loop on textbox focus

前端 未结 5 1143
孤街浪徒
孤街浪徒 2021-01-18 05:39

I\'m getting some strange happenings on google chrome. With the following code I\'m getting an infinite number of alerts.

<

5条回答
  •  生来不讨喜
    2021-01-18 06:18

    I think, it's because after you close the dialog (alert box), the focus returns on the textbox, therefore, the function will fire again.

提交回复
热议问题