运行 ❯
获取您的
自有
网站
×
更改方向
保存代码
更改主题,暗/亮
前往 Spaces
<!DOCTYPE html> <html> <body> <p><del id="myDel" datetime="2011-11-15T22:55:03Z">This text has been deleted</del></p> <p>Click the button to return the value of the datetime attribute of the deleted text.</p> <button onclick="myFunction()">Try it</button> <p id="demo"></p> <script> function myFunction() { var x = document.getElementById("myDel").dateTime; document.getElementById("demo").innerHTML = x; } </script> </body> </html>