代码之家  ›  专栏  ›  技术社区  ›  Christian Oudard

类似Gmail的警报框(用于信息或错误显示)通过ASP中的jQuery。网

  •  5
  • Christian Oudard  · 技术社区  · 6 年前

    我正在寻找一些示例代码/控件,通过ASP中的jQuery让我感觉像gmail一样的消息框。网

    2 回复  |  直到 15 年前
        1
  •  13
  •   Davy Landman    16 年前

    我想你要找的是 jQuery BlockUI .

    看一看 demo's .

    使用css你可以匹配gmail的风格。

        2
  •  5
  •   Pawel Krakowiak    16 年前

    你可以使用插件,但你也可以在页面顶部有一个固定的DIV,然后淡入淡出。我们来看一个例子:

    <!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>
            <title>jQuery</title>
            <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" type="text/javascript"></script>
            <script type="text/javascript">
                $(document).ready(function() {
                    $('input').click(function() {
                        $('#notification').fadeIn('slow');
                    });
                });
            </script>
        </head>
        <body style="height: 1000px;">
            <div id="notification" style="position: fixed; top: 0px; margin-left: 50%; background-color: yellow; font-weight: bold; display: none;">Sending...</div>
            <input type="button" value="Gmail notification!" />
        </body>
    </html>
    

    你必须弄清楚如何隐藏它(操作完成后的回调等)、设置它的样式等等。这只是一个例子。