Home  >  Article  >  Web Front-end  >  DWR realizes the principle and code of simulating Google search effect_javascript skills

DWR realizes the principle and code of simulating Google search effect_javascript skills

WBOY
WBOYOriginal
2016-05-16 17:42:351234browse
Copy code The code is as follows:




This js can be placed in the jsp you need to achieve the search effect, or saved as a separate js file.
Copy code The code is as follows:


onkeydown="oldKeyValue=this.value.trim();setSelectedKey();"
onkeyup="getConformKey();"
onfocus="if(this.value=='Find someone') this .value='';setDropListVisible(true);"
onblur="setDropListVisible(false);"
style="width: 300; height: 23;z-index: 10;top:0;left: 0;" type="text" name="cond" value="Find someone" id="cond" />



useraction.findByLike(String name); is a query method of the dao layer,
returns a List, Just replace this with your own implementation.
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn