我有一个jquery函数,它有ajax方法,当焦点出文本框函数必须触发时。我在ajaxpanel中有一个服务器端按钮但是当我按下按钮并且按钮操作正常时,则永远不会执行焦点
jQuery("#drpProvider").focusout(function () {
var x;
var customer = 1;
$.ajax({ type: "POST",
url: "request.aspx/branchsafed",
contentType: "application/json; charset=utf-8",
data: JSON.stringify({
customer: customer
}),
dataType: "json",
success: function (ret) {
var specification = ret.d;
if (ret.d == "no") {
}
else {
var temp = ret.d;
$("#blocklable").text(temp);
}
}
});
});
答案 0 :(得分:1)
<input id="title">
的javascript:
$('#title').focusout(function() {
if( $(this).val() ) {
alert('!!');
$(this).unbind('focusout');
}
});