jquery easyui textbox onblur事件,textbox blur事件无效解决方案

 

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>.

蕃薯耀 2016年8月11日 10:55:53 星期四

http://fanshuyao.iteye.com/

 

一、问题描述:

Jquery easyui中,textbox是无blur事件(失去焦点事件)

 

二、解决方案:

1、网上搜索最多是这种解决方法,但本人测试后,一点反应都没有,但span标签是有blur事件的。

 

无效方法 ↓:

$("input",$("#loginName").next("span")).blur(function(){  
    alert("登录名已存在");  
})  

 

2、有效的方法:

在textbox的data-options添加events:{blur:checkLoginName},其中checkLoginName是方法名,具体如下:

 data-options="events:{blur:checkLoginName},required:true,validType:'loginName'" 

 

完整的:

<input class="f1 easyui-textbox ztrim" 
      
    value="" 
    data-options="events{blur:checkLoginName},required:true,validType:'loginName'"/>

 

 

 

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>.

蕃薯耀 2016年8月11日 10:55:53 星期四

http://fanshuyao.iteye.com/

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-03-06
  • 2021-11-19
  • 2021-11-11
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-09-22
  • 2021-09-08
  • 2021-12-05
  • 2022-12-23
  • 2022-12-23
  • 2021-09-25
  • 2022-12-23
相关资源
相似解决方案