3
在html页面内的标准文本框中,当用户键入浏览器然后识别其中一部分并显示“自动完成下拉列表”的内容时:鼠标选择自动完成选项 - 什么是javascript/jquery事件?
当使用鼠标选择/单击时,从而输入值到其文本框中,什么JavaScript事件被解雇?
$('#txt').blur(function() { console.log('text changed'); });
$('#txt').change(function() { console.log('text changed'); });
$('#txt').click(function() { console.log('text changed'); });
$('#txt').focus(function() { console.log('text changed'); });
$('#txt').focusin(function() { console.log('text changed'); });
$('#txt').focusout(function() { console.log('text changed'); });
$('#txt').mousedown(function() { console.log('text changed'); });
$('#txt').mouseenter(function() { console.log('text changed'); });
$('#txt').mouseleave(function() { console.log('text changed'); });
$('#txt').mouseout(function() { console.log('text changed'); });
$('#txt').mouseover(function() { console.log('text changed'); });
$('#txt').select(function() { console.log('text changed'); });
这些都不行!
当您选择或点击该字段时(从自动完成中选择一个选项后),将会触发“更改”。请注意,即使他们使用鼠标事件也不够,因为您可以使用键盘上的浏览器自动完成功能。 – nnnnnn 2011-12-14 10:59:23
`this is selected`,你是指建议列表中的自动完成项目?你用什么插件? – 2011-12-14 11:00:01