jQuery UI由GUI小部件,視覺效果和使用HTML,CSS和jQuery實現的主題組成。 jQuery UI非常適合為網頁構建UI接口。 jQuery UI旋轉器區域性選項用於設置區域性,以用於解析和格式化值。如果將此值設置為null,則使用Globalize中當前設置的區域性。
用法:
$( ".selector" ).spinner({
  culture:"fr"
});CDN鏈接:首先,添加項目所需的jQuery UI腳本。
<link rel=”stylesheet” href=”//code.jquery.com/ui/1.12.1/themes/smoothness/jquery-ui.css”>
<script src=”//code.jquery.com/jquery-1.12.4.js”></script>
<script src=”//code.jquery.com/ui/1.12.1/jquery-ui.js”></script>
例:
HTML
<!DOCTYPE html>
<html lang="en">
  
<head>
    <meta charset="utf-8">
    <link rel="stylesheet" href=
    "//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
    <script src="https://code.jquery.com/jquery-1.12.4.js">
    </script>
    <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js">
    </script>
  
    <script>
        $(function () {
            $("#gfg").spinner({
                culture:"de-DE",
                numberFormat:"C",
                step:2
            });
        });
    </script>
</head>
  
<body>
    <h1 style="color:green;">GeeksforGeeks</h1>
    <h2>jQuery UI spinner culture option</h2>
  
    <div id="geeks">
        <input type="text" id="gfg" value="45" />
    </div>
</body>
  
</html>輸出:

相關用法
- jQuery UI Spinner max用法及代碼示例
 - jQuery UI Spinner min用法及代碼示例
 - jQuery UI Spinner disabled用法及代碼示例
 - jQuery UI Spinner step用法及代碼示例
 - jQuery UI Spinner option()用法及代碼示例
 - jQuery UI spinner page用法及代碼示例
 - jQuery UI spinner icons用法及代碼示例
 - jQuery UI spinner classes用法及代碼示例
 - jQuery UI Spinner stepUp()用法及代碼示例
 - jQuery UI Spinner stepDown()用法及代碼示例
 - jQuery UI Spinner pageDown()用法及代碼示例
 - jQuery UI Spinner pageUp()用法及代碼示例
 - jQuery UI Spinner disable()用法及代碼示例
 - jQuery UI Spinner enable()用法及代碼示例
 - jQuery UI Spinner spin用法及代碼示例
 - jQuery UI Spinner create用法及代碼示例
 - jQuery UI Spinner start用法及代碼示例
 - jQuery UI Spinner stop用法及代碼示例
 - jQuery UI Spinner change用法及代碼示例
 - jQuery UI Spinner widget()用法及代碼示例
 
注:本文由純淨天空篩選整理自ppatelkap大神的英文原創作品 jQuery UI spinner culture Option。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。
