April 9, 2013

Display Text After 5 seconds On Page Refresh

This post shows the demonstration on how to show text after some seconds in Asp.net application. Here we use JavaScript to fulfil this need.


<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Untitled Page</title>
    <script type="text/javascript" src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
    
    <script type="text/javascript">

        $(document).ready(function(){
          setTimeout(function(){
            $('#delayText').show();
            }
          , 5000);
        });
    
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <span id="delayText" style="display:none;">Hello Testing</span>
    </div>
    </form>
</body>
</html>

No comments:

Post a Comment