时间:2021-07-01 10:21:17 帮助过:6人阅读
$("#btnSubmit").click(function () {
$.blockUI({
message: $("#loginForm"),
css: {
width: '300px',
height: '300px',
left: ($(window).width() - 300) / 2 + 'px',
top: ($(window).height() - 300) / 2 + 'px',
border: 'none'
}
});
});
$("#btnLogin").click(function () {
$.blockUI({
message: "<h2>正在登录,请稍候……</h2>",
css: {
border: '1px solid black'
}
});
setTimeout(function () { $.unblockUI() }, 1000);
});
$("#btnCancel").click(function () {
$.unblockUI();
});
对应的html代码为:
代码如下:
<div id="loginForm" style="display:none">
<table>
<tr>
<td>用户名:</td>
<td><input id="txtUserName" type="text" /></td>
</tr>
<tr>
<td>密 码:</td>
<td><input id="txtPwd" type="text" /></td>
</tr>
<tr>
<td><input id="btnLogin" type="button" value="登录" /></td>
<td><input id="btnCancel" type="button" value="取消" /></td>
</tr>
</table>
</div>