码迷,mamicode.com
首页 > 其他好文 > 详细

timeout使用实例

时间:2018-04-06 21:16:58      阅读:120      评论:0      收藏:0      [点我收藏+]

标签:doctype   tle   function   value   post   innertext   ext   oct   val   

<!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>

  

timeout使用实例

标签:doctype   tle   function   value   post   innertext   ext   oct   val   

原文地址:https://www.cnblogs.com/qiangayz/p/8728771.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!