This is a fun page. Click or tab into the text box below. It has an onFocus handler which calls an alert. Oops. When the alert is called, focus leaves the box. When the alert is done, focus is returned to the box. This is an infinite recursion. I have avoided the infinite recursion but counting how many alert boxes appear: after 5 appear, then I remove the handlers for the text box. If the handlers are not removed, then the only way to stop the recursion is to kill the browser.

Give focus to this text box by clicking in it or tabbing into it

You may change the number of recursions by selecting a new number, and then re-focusing in the text box.

Change the number of recursions: 1 to 10