//等待用户不输入 1 秒后再去执行 loadData
var
loseInputMillsecs
=
1000
;
var
clocker
=
null
;
function
loadData
()
{
console
.
info
(
"do load data list"
);
clocker
=
null
;
}
function
innerKeydown
()
{
if
(
null
==
clocker
)
{
clocker
=
setTimeout
(
loadData
,
loseInputMillsecs
);
}
else
//连续击键,重新开始计时
{
clearTimeout
(
clocker
);
clocker
=
setTimeout
(
loadData
,
loseInputMillsecs
);
}
}
$
(
'#statementContent'
).
find
(
'#moudel_selectex>input'
).
keydown
(
function
(){
innerKeydown
();
})
http://blog.csdn.net/lizhihaoweiwei/article/details/51221985
输入框中根据用户输入内容动态查询
最新推荐文章于 2018-03-13 18:53:54 发布