案例:jQuery UI案例     状态:可编辑再运行    进入竖版
 运行结果 
AخA
 
1
<!doctype html>
2
<html lang="en">
3
<head>
4
  <meta charset="utf-8">
5
  <title>jQuery UI 按钮(Button) - 图标</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
  <script>
11
  $(function() {
12
    $( "button:first" ).button({
13
      icons: {
14
        primary: "ui-icon-locked"
15
      },
16
      text: false
17
    }).next().button({
18
      icons: {
19
        primary: "ui-icon-locked"
20
      }
21
    }).next().button({
22
      icons: {
23
        primary: "ui-icon-gear",
24
        secondary: "ui-icon-triangle-1-s"
25
      }
26
    }).next().button({
27
      icons: {
28
        primary: "ui-icon-gear",
29
        secondary: "ui-icon-triangle-1-s"
30
      },
31
      text: false
32
    });
33
  });
34
  </script>
35
</head>
36
<body>
37
 
38
<button>只带有图标的按钮</button>
39
<button>图标在左侧的按钮</button>
40
<button>带有两个图标的按钮</button>
41
<button>带有两个图标且不带文本的按钮</button>
42
 
43
 
44
</body>
45
</html>