JavaScript setting pointer-events

前端 未结 3 901
半阙折子戏
半阙折子戏 2021-02-03 17:05

I am trying to set pointer-events: none for a div through JavaScript, however the property is not being applied.

I have tried:

document.getE         


        
3条回答
  •  有刺的猬
    2021-02-03 17:42

    There is an example in a book which uses element.setAttributeNS(null, "pointer-events", "none"); instead of using element.style.pointer-events = "none";.

提交回复
热议问题