悟生慧

 

ASP.NET如何让Label控件的Text值在10秒后清空?

前台JS

<script type="text/javascript">
     function Clear()
     {
         setTimeout(function(){document.getElementById('<%=lblAddRess.ClientID%>').innerText='';}, 10000);
         return 0;
      }
    </script>

后台

 if (!IsPostBack)
        {
             this.RegisterStartupScript("clear", "<script>Clear();</script>");

        }

posted on 2011-04-11 21:28  悟生慧  阅读(1139)  评论(0编辑  收藏  举报

导航