Use Jquery.autocomplete automatic completion function to achieve Baidu search Drop-down function
;
<script language= "Web Effects" src= "Jquery.autocomplete.js" ></SCRIPT>
<script>
$ (). Ready (function () {
$ ("#borough_name"). AutoComplete ("z.php tutorial", {
minchars:2,
width:260,
delay:0,
mustmatch:true,
matchcontains:false,
scrollheight:220,
selectfirst:true,
scroll:true,
Formatitem:function (data, I, total) {
if (data[1]== "a") {
return ' <strong> ' +data[0]+ ' </strong> ';
}
return data[0];
}
});
}
</script>
<input id= "zti_name" class= "input" name= "Zti_name" type= "text" />
Span class= "Tip" > Example: Enter "Subject love" or phonetic initials "ZTI", select </span> from the Drop-down list,
<p id= "Errmsg_zti_name" class= "ErrorMessage" "display=" None "></p>
The
z.php file is a simple MySQL tutorial +php database Tutorial query, and this is no longer spoken.