combobox的失去焦点事件
<input id="wenhao">
$(function () {
$('#wenhao').combobox({
valueField: 'wenhao',
textField: 'wenhao',
panelHeight:'auto',
onChange: function (newValue, oldValue) {
if (newValue != null) {
var wenhao= $('#wenhao').combobox('getText');
if(wenhao == undefined || wenhao == ''){
return;
}
var urlStr = '${pageContext.request.contextPath}/combobox!selectWenhao.action?wn=' + encodeURI(wenhao);
$('#wenhao').combobox("reload", urlStr);
}
}
});
});
$('#wenhao').blur(function (){
alert('进来了');
query2();
});
如上,我做了一个自动完成框,并且设置了这个框的失去焦点事件,但是没效果。
求各位大神指导啊,我该如何改?
------解决方案--------------------easyui已经重新生成一个input对象了,给原来的input绑定blur没用,原来的隐藏起来了,要给easyui生成的input添加blur事件
$(function () {
$('#wenhao').combobox({
valueField: 'wenhao',
textField: 'wenhao',
panelHeight:'auto',
onLoadSuccess:function(){
$('#wenhao').next('.combo').find('input').blur(function (){
alert('进来了');
query2();
});
},
onChange: function (newValue, oldValue) {