运行 ❯
获取您
的
网站
×
更改方向
保存代码
更改主题,深色/浅色
前往 Spaces
<!DOCTYPE html> <html> <head> </head> <body> <h1>Change pointer-events with JavaScript</h1> <p>Click the "Try it" button to change the pointer-events property of the DIV1 element:</p> <button onclick="myFunction()">Try it</button> <div id="div1">Go to <a href="https://w3schools.org.cn/css">CSS Tutorial</a></div> <script> function myFunction() { document.getElementById("div1").style.pointerEvents = "none"; } </script> </body> </html>