需要在当前div中添加:onkeydown="keySearch()"
函数:
回车键是13;
function keySearch() { if (event.keyCode == 13) { event.keyCode = 9; event.returnValue = false; searchInfo() } }