$('#logonButton').click(function() {
if ($(this).text() == 'logon') {
$(this).css('cursor','wait');
$.getJSON('http://localhost:8080/test?method=logon', function(data, returnValue) {
$('#output').append("<p>"+data+"</p>");
$('#logonbutton').css('cursor','default');
$('#logonButton').text('logoff');
});
...
此登录需要一些时间为默认,所以我想将光标定位到“等待”的JSON调用之前,然后将其设置回“默认”回调时被击中。光标不会恢复在JSON回调
调用返回并将数据添加到输出div,但#logonButton div文本不更改,并且光标停留在“繁忙”状态。
*尴尬*谢谢.... – shaz 2013-02-23 15:26:29