asp.net主页中的图像加载器

时间:2017-02-22 13:07:37

标签: javascript c# jquery asp.net

图片加载器无法完全加载。这是我的代码:

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
 <script src="JS/jquery-1.10.2.js" type="text/javascript"></script>
<style type="text/css">
.modal
{
    position: fixed;
    top: 0;
    left: 0;
    background-color: black;
    z-index: 99;
    opacity: 0.8;
    filter: alpha(opacity=80);
    -moz-opacity: 0.8;
    min-height: 100%;
    width: 100%;
}
.loading
{
    font-family: Arial;
    font-size: 10pt;

    width: 200px;
    height: 100px;
    display: none;
    position: fixed;

    z-index: 999;
}
</style>
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
    <script type="text/javascript">
        function ShowProgress() {
            setTimeout(function () {
                var modal = $('<div />');
                modal.addClass("modal");
                $('ContentPlaceHolder1').append(modal);
                var loading = $(".loading");
                loading.show();
                var top = Math.max($(window).height() / 2 - loading[0].offsetHeight / 2, 0);
                var left = Math.max($(window).width() / 2 - loading[0].offsetWidth / 2, 0);
                loading.css({ top: top, left: left });
            }, 200);
        }
        $('form').live("submit", function () {
            ShowProgress();
        });
</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <asp:Button ID="btnSubmit" runat="server" Text="Button" OnClick="btnSubmit_Click"/>
    <div class="loading" align="center">
    Loading. Please wait.<br />
    <br />
    <img src="IMAGES/loader231.gif" alt="" />

</div>
</asp:Content>

我想知道如何在上面的代码中调用模型。

0 个答案:

没有答案