我不确定我做错了什么,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>
将哈希符号添加到 btnSearch 选择器:$('#<%= btnSearch.ClientID %>')