<link href="css/jquery.autocomplete.css" rel="stylesheet" type="text/css" />
<script src="Jquery1.7.js" type="text/javascript"></script>
下面 这是一个jQuery插件
<script src="jquery.autocomplete.js" type="text/javascript"></script>
<script type="text/javascript">
$(function () {
var arry = ['admin', 'aspx', 'bing', 'wap', 'windows', 'wp7', 'wp8', 'win8'];
$('#content').autocomplete(arry).result(function (event, data) {
$('#Text2').val(data);
window.open('http://www.baidu.com/s?wd='+data );
})
})
</script>
</head>
<body>