案例:jQuery UI案例     状态:可编辑再运行    进入竖版
 运行结果 
x
 
1
<!doctype html>
2
<html>
3
<head>
4
  <meta charset="utf-8">
5
  <title>jQuery UI 旋转器(Spinner) - 货币</title>
6
  <link rel="stylesheet" href="//code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css">
7
  <script src="//code.jquery.com/jquery-1.9.1.js"></script>
8
  <script src="/static/js/jqueryui/resources/demos/external/jquery.mousewheel.js"></script>
9
  <script src="/static/js/jqueryui/resources/demos/external/globalize.js"></script>
10
  <script src="/static/js/jqueryui/resources/demos/external/globalize.culture.de-DE.js"></script>
11
  <script src="/static/js/jqueryui/resources/demos/external/globalize.culture.ja-JP.js"></script>
12
  <script src="//code.jquery.com/ui/1.10.4/jquery-ui.js"></script>
13
  <link rel="stylesheet" href="https://jqueryui.com/resources/demos/style.css">
14
  <script>
15
  $(function() {
16
    $( "#currency" ).change(function() {
17
      $( "#spinner" ).spinner( "option", "culture", $( this ).val() );
18
    });
19
 
20
    $( "#spinner" ).spinner({
21
      min: 5,
22
      max: 2500,
23
      step: 25,
24
      start: 1000,
25
      numberFormat: "C"
26
    });
27
  });
28
  </script>
29
</head>
30
<body>
31
 
32
<p>
33
  <label for="currency">要捐款的货币</label>
34
  <select id="currency" name="currency">
35
    <option value="en-US">US $</option>
36
    <option value="de-DE">EUR €</option>
37
    <option value="ja-JP">YEN ¥</option>
38
  </select>
39
</p>
40
<p>
41
  <label for="spinner">要捐款的数量:</label>
42
  <input id="spinner" name="spinner" value="5">
43
</p>
44
</body>
45
</html>
46