编辑下面的代码:【加编码】
<html> <body> <p>这是一个文本 <ins id="myIns" datetime="2012-09-15T22:55:03Z">这是一个插入文本</ins> </p> <p>点击按钮修改插入文本中的datetime属性值。</p> <p id="demo"></p> <button onclick="myFunction()">点我</button> <script> function myFunction() { document.getElementById("myIns").dateTime="2013-11-15T21:40:07Z"; document.getElementById("demo").innerHTML="datetime 属性值被修改为 '2013-11-15T21:40:07Z'."; } </script> </body> </html>
结果: 【此窗口】 帮助?
Try it Yourself - © 自强学堂