Copy codeThe Code is as follows: <! DOCTYPE html PUBLIC "-// W3C // dtd xhtml 1.0 Transitional // EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<Html xmlns = "http://www.w3.org/1999/xhtml">
<Head>
<Title> </title>
<! -- Pay attention to the referenced plug-ins and their order -->
<Link href = "jquery.autocomplete.css" rel = "stylesheet" type = "text/css"/>
<Script src = "Jquery1.7.js" type = "text/javascript"> </script>
<Script src = "jquery. autocomplete. js" type = "text/javascript"> </script>
<Script src = "messages_cn.js" type = "text/javascript"> </script>
<Script type = "text/javascript">
$ (Function (){
Var array = ['A', 'as', 'asd ', 'bs', 'bd '];
// Search for the selected value
// $ ('# Search'). autocomplete (array). result (function (event, data ){
// $ ('# Text1'). val (data );
//});
// Smart sensing for Internet connection search
$ ('# Search'). autocomplete (array). result (function (event, data ){
Window. location. href = 'HTTP: // www.baidu.com/s? Wd = '+ data +' + & rsv_spt = 1 & issp = 1 & rsv_bp = 0 & ie = UTF-8 & tn = 56060048_pg & rsv_sug3 = 3 & rsv_sug = 0 & rsv_sug1 = 3 & rsv_sug4 = 100'
});
})
</Script>
</Head>
<Body>
<Div>
<Input type = "text" id = "search"/> <input type = "button" id = "b1" value = "search"/> <input type = "text" id = "Text1"/>
</Div>
</Body>
</Html>