Home > Web Front-end > JS Tutorial > 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
Release: 2016-05-16 17:42:35
Original
1254 people have browsed it
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.
Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template