jsp中使用Jquery autocomplete plugin 读取远程数据,实现信息智能提示 .
1. 做一个前台显示文件,代码如下:
HTML
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
- <html>
- <head>
- <title></title>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <script src="jquery/jquery-1.3.2.js"></script>
- <script src="jquery/jquery.autocomplete.js"></script>
- <link href="jquery/jquery.autocomplete.css" rel="stylesheet" type="text/css">
- <script>
- $(document).ready(function(){
- $('#book_name').autocomplete("search",{
- minChars: 0,
- max: 20,
- autoFill: true,
- mustMatch: true,
- matchContains: true, //true 则显示包含关键字的词
- &nbs