how to make a DIV unfocusable?

前端 未结 5 1615
情深已故
情深已故 2021-02-07 10:16

I met a problem about HTML rendering.

In dir=\"rtl\" document of IE7, when JavaScript tries to set focus to a DIV element(with oElement.focus() method), the rendering tu

5条回答
  •  时光说笑
    2021-02-07 10:49

    Below is the some way to make DIV unfocusable using jquery.

        //  Set the tabindex atribute to -1.
            1)$("divid").attr('tabindex','-1');
        //  Remove the tabindex atribute if exists.
            2) $("divid").removeAttr('tabindex');
       //   This is third way.
            3) $("divid").blur();
    

提交回复
热议问题