我不确定我做错了什么BlockUI无效。希望你们能帮忙,谢谢。
我想点击搜索按钮后,用户无法使用该用户界面。
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
<script src="../JS/jquery-1.9.1.js" type="text/javascript"></script>
<script src="../JS/jquery.blockUI.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function() {
$('<%= btnSearch.ClientID %>').click(function() {
$.blockUI({ message: 'Just a momeqweqwent...'});
setTimeout(function() {
$.unblockUI({
onUnblock: function() { alert('onUnblock'); }
});
}, 2000);
});
});
</script>
<asp:Button ID="btnSearch" runat="server" Text="Search" CssClass="Rect" OnClick="btnSearch_Click">
</asp:Button>
答案 0 :(得分:0)
将哈希符号添加到btnSearch选择器:$('#<%= btnSearch.ClientID %>')