当添加一个用户的时候  
要提示一个对话框  
但是这个对话框要自动关闭比如停靠多少秒之后关闭 而不是点击确定的时候在关闭
这个提示窗体要给人感觉美观,请贴出代码谢谢 。

解决方案 »

  1.   

    我这样做隐藏: setTimeout(function(){document.getElementById("ID").style.display='none';},5000);
    //5秒后隐藏你可以换成别的Style
      

  2.   


    <input type="button" value="test" id="btton" /><div id="display" style="display:none;width:600px;margin-top:20px;height:60px;background:#f39;"></div><script>
    var btn = document.getElementById('btton');
    var show = document.getElementById('display');
    btn.onclick = function(){
    show.style.display = "block";
    setTimeout(function(){show.style.display = "none";},1200);
    }
    </script>