日期:2014-05-16  浏览次数:20423 次

求jquery写法
 <input type id="ttt" name="ttt">  
当鼠标离开该输入框的时候调用js的某方法,进行ajax后台异步调用,求jquery写法

------解决方案--------------------
$("#ttt").on("mouseleave",function(){
alert("out");
});


类似这样。。

on方法的具体使用:http://api.jquery.com/on/
------解决方案--------------------
$(function(){
$('#ttt').blur(function(){
  $.ajax({url:'xxxxxxx',data:'v='+this.value,
success:function(){},
error:function(){}
})

})
});