网页显示后一段时间后显示,如果选择“咨询”,则弹出来聊天窗口。如果选择“稍后再说”,则窗口消失,但是过一段时间又弹出来

来源:互联网 发布:sql存储过程经典实例 编辑:程序博客网 时间:2024/06/03 01:22

 <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <script type="text/javascript">
      
        function ZiXun() {
            window.location("Default2.aspx");//跳转到另一个页面
        }
        function Later1() {
            document.getElementById('Start').style.display = "block";//显示div
        }
        function Later() {
            document.getElementById('Start').style.display = "none";//隐藏div
            setTimeout(Later1, 5000);//定时显示
        }
      
    </script>
    <style type="text/css">
        #Button2
        {
            width: 119px;
            height: 31px;
        }
        #Button1
        {
            width: 127px;
            height: 32px;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div id="all">
    <div id="Start" style="width: 502px; height: 262px; background-image: url('Images/Call.bmp');">
        <input id="Button1" style="background-color: #FFFF00; color: #FF0000"
            type="button" value="点击咨询" onclick="ZiXun()"/>&nbsp;
        <input id="Button2" style="background-color: #FFFF00; color: #FF0000"
            type="button" value="稍后再说" onclick="Later()"/></div>
            </div>
    </form>
</body>
</html>

原创粉丝点击