欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

JS定時(shí)關(guān)閉窗口的實(shí)例

 更新時(shí)間:2013年05月22日 11:31:24   作者:  
JS定時(shí)關(guān)閉窗口的實(shí)例,需要的朋友可以參考一下
復(fù)制代碼 代碼如下:

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <style type ="text/css" >
    .main{ background-color:Silver; width :200px; height :100px; margin-left:40%; margin-top :200px; text-align :center;}
    </style>
    <script src="js/ui/jquery-1.7.1.min.js" type="text/javascript"></script>
    <script language="javascript" type="text/javascript">
        var n = 3;
        function showTime() {
            n--;
            $('#divMain').html(n + ' 秒后關(guān)閉窗口');
            if (n == 0)
                window.close();
            else
                setTimeout('showTime()', 1000);
        }
    </script>
</head>
<body onload ="showTime()">
    <form id="form1" runat="server">
    <div id ="divMain" class ="main" >

    </div>
    </form>
</body>
</html>

相關(guān)文章

最新評(píng)論