运行 ❯
获取您
自己的
网站
×
更改方向
保存代码
更改主题,深色/浅色
前往 Spaces
<!DOCTYPE html> <html> <body> <h1>DOM touchmove Event</h1> <p ontouchmove="myFunction()">Touch this paragraph, and move the finger to trigger a function that will write "Hello World".</p> <p><strong>Note:</strong> This example is for touch devices only.</p> <p id="demo"></p> <script> function myFunction() { document.getElementById("demo").innerHTML = "Hello World"; } </script> </body> </html>