案例:jQuery UI案例     状态:可编辑再运行    进入竖版
 运行结果 
AخA
<img id="project-icon" src="images/transparent_1x1.png" class="ui-state-default" alt="">
 
1
<!doctype html>
2
<html lang="en">
3
<head>
4
  <meta charset="utf-8">
5
  <title>jQuery UI 自动完成(Autocomplete) - 自定义数据并显示</title>
6
  <link rel="stylesheet" href="/css/jqu1.10.4/jquery-ui.min.css">
7
  <script src="/js/jqu/jquery.min1.10.2.js"></script>
8
  <script src="/js/jqu/jquery-ui.min1.10.4.js"></script>
9
  <link rel="stylesheet" href="jqueryui/style.css">
10
  <style>
11
  #project-label {
12
    display: block;
13
    font-weight: bold;
14
    margin-bottom: 1em;
15
  }
16
  #project-icon {
17
    float: left;
18
    height: 32px;
19
    width: 32px;
20
  }
21
  #project-description {
22
    margin: 0;
23
    padding: 0;
24
  }
25
  </style>
26
  <script>
27
  $(function() {
28
    var projects = [
29
      {
30
        value: "jquery",
31
        label: "jQuery",
32
        desc: "the write less, do more, JavaScript library",
33
        icon: "jquery_32x32.png"
34
      },
35
      {
36
        value: "jquery-ui",
37
        label: "jQuery UI",
38
        desc: "the official user interface library for jQuery",
39
        icon: "jqueryui_32x32.png"
40
      },
41
      {
42
        value: "sizzlejs",
43
        label: "Sizzle JS",
44
        desc: "a pure-JavaScript CSS selector engine",
45
        icon: "sizzlejs_32x32.png"
46
      }
47
    ];
48