<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> </head> <body> <div id="i1"></div> <input type="button" value="删除" onclick="Delete()" /> <script> function Delete(){ document.getElementById('i1').innerText = '已删除'; setTimeout(function () { document.getElementById('i1').innerText=''; },5000) } </script> </body> </html>