我已使用以下jquery代码在页面加载时阻止ui.但它不起作用.请帮忙. [英] I have used the below jquery code for blocking ui on pageload. But its not working. Please help.

查看:39
本文介绍了我已使用以下jquery代码在页面加载时阻止ui.但它不起作用.请帮忙.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

<!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 src="js/jquery.blockUI.js" type="text/javascript"></script>
    <script type="text/javascript" language="javascript">
        $(document).ready(function () {
            $(function () {
                $.blockUI({ css: {
                    border: 'none',
                    padding: '15px',
                    backgroundColor: '#000',
                    '-webkit-border-radius': '10px',
                    '-moz-border-radius': '10px',
                    opacity: .5,
                    color: '#fff'
                }
                });
            });
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <div id="test" class="content UserForm">
                <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
                <asp:Button ID="Button1" CssClass="b1" runat="server" Text="Button" />
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
    </form>
</body>
</html>

推荐答案

(文档).ready( function (){
(document).ready(function () {


(函数(){


.blockUI ({css:{ 边框:' 没有', 填充:' 15px', backgroundColor:' #000'' -webkit-border-radius':' 10px'' -moz-border-radius':' span> 10px', 不透明:. 5 , 颜色:' #fff' } }); }); } < / 脚本 > < /head > < 正文 > < 表单 =" form1" runat >服务器" > < asp:ScriptManager ID =" runat 服务器" < /asp:ScriptManager > < asp:UpdatePanel ID =" runat 服务器" < ContentTemplate > < div =" test" content UserForm" > < asp:TextBox ID =" runat 服务器" < > < asp:Button ID =" CssClass b1 " runat 服务器" 文本 按钮" / > < /div > < /ContentTemplate > < /asp:UpdatePanel > < /form > < /body > < /html >
.blockUI({ css: { border: 'none', padding: '15px', backgroundColor: '#000', '-webkit-border-radius': '10px', '-moz-border-radius': '10px', opacity: .5, color: '#fff' } }); }); } </script> </head> <body> <form id="form1" runat="server"> <asp:ScriptManager ID="ScriptManager1" runat="server"> </asp:ScriptManager> <asp:UpdatePanel ID="UpdatePanel1" runat="server"> <ContentTemplate> <div id="test" class="content UserForm"> <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox> <asp:Button ID="Button1" CssClass="b1" runat="server" Text="Button" /> </div> </ContentTemplate> </asp:UpdatePanel> </form> </body> </html>


这篇关于我已使用以下jquery代码在页面加载时阻止ui.但它不起作用.请帮忙.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆