Tabindex to skip iframe but not content inside

前端 未结 1 1810
清歌不尽
清歌不尽 2021-01-20 01:06

I have a page with an iframe on it, and the iframe contains a form. Outsie my iframe i have more forms.

The input elements inside the iframe are tabindex 1, 2, 3, 4,

1条回答
  •  感情败类
    2021-01-20 02:13

    To answer part of your question, the body element inside the iframe is a focusable element.

    You can prevent this effect by setting tabindex to -1 on the body of the loaded frame. For example:

    outer.html:

    
     
     
     
     
     
    
    

    inner.html:

    
     
     
     
     
    
    

    0 讨论(0)
提交回复
热议问题