Javascript: trap focus in dialog
<p>I have a popup dialog (a div with a high z-index) which contains some input elements. While this dialog is open, I'd like tab and shift-tab to only cycle between elements in this dialog. How can I accomplish this?</p>
