テキストボックスの入力値を数値限定にしてくれる「jQuery - numeric」
「jQuery - numeric」は、テキストボックスへの入力を数字のみに制限してくれるjQueryプラグインです。正/負、整数/小数点 チェックまで限定してくれます。ダウンロード
スクリプト
<script src="jquery.min.js" type="text/javascript"></script> <script src="jquery.numeric.js" type="text/javascript"></script>
実装
<input class="numeric antirc" type="text">
<input class="integer antirc" type="text">
<input class="positive antirc" type="text">
<input class="positive-integer antirc" type="text">
<script type="text/javascript">
// 数値
$(".numeric").numeric();
// 整数
$(".integer").numeric({ decimal: false });
// 正の数値
$(".positive").numeric({ negative: false });
// 正の整数
$(".positive-integer").numeric({ decimal: false, negative: false });
// *「右クリック貼り付け」対応
$(".antirc").change(function() {
$(this).keyup();
});
</script>
全角チェックも含めて、主要なブラウザでは特に問題なく動作しました。
(Firefox, Chrome, IE8+, Opera, Safari)
デモ
関連記事
-
-
Lightboxプラグイン「Boxer」
「Boxer」はLightboxやモーダルウィンドウを実装できるjQueryプラグインです。画像だけでなく動画にも対応しています。 モバイル環境にも最適化されていて、#レスポンシブ 対応で、#スワイ
-
-
iTunesのCover Flowのようなギャラリーが実装できる「ContentFlow」
「ContentFlow」は、iTunesのCover Flowのように左右に流れるギャラリーが実装できるjQueryプラグインです。ダウンロード スクリプト 実装
-
-
数値入力に便利なステッパーを実装「Numeric Stepper」
「Numeric Stepper」は、数値用のステッパーを実装できるjQueryプラグインです。ダウンロード | デモ スクリプト 実装 既存のテキストボックスにclas
-
-
レスポンシブに対応した画像ギャラリーが実装できる「Responsive Image Gallery」
「Responsive Image Gallery with Thumbnail Carousel」はレスポンシブにも対応した画像ギャラリーが実装できるjQueryプラグインです。Twitterの「最
-
-
画像ギャラリーを実装できる「Galleria」
Galleriaは、わずか数行で画像ギャラリーが作成できるjQueryプラグインです。Airbnbのページで使用されていて、コレいいな~と思い試してみました。 ナビゲーション内にサムネイルを
-
-
Amazonのような画像ズーム機能が実装できる「SergeLand Image Zoomer」
「SergeLand Image Zoomer v3.0」はAmazonなどでみられるマウスオーバーで画像をズームしてくれる機能を実装できるjQueryプラグインです。 ダウンロード *黄色ボタン
-
-
Bootstrap Modal + 拡張機能が実装できるプラグイン(Bootstrap 2)
Twitter Bootstrap Modalは、標準のモーダルウィンドウに様々な機能を追加することができます。 Twitter Bootstrap純正スクリプト ダウンロード / サイト
-
-
実装方法が選べるツールチップ用プラグイン「Smallipop」
Smallipopは、ツールチップの実装をマークアップベース(HTMLに書き出し)とJavascriptベース両方で行えるjQueryプラグインです。世の中この手のツールは結構片方でのみだったりします
-
-
ファイルアップロードフォーム プラグイン
Ajax File Upload Form with jQuery Ajax File Upload Form with jQuery [browser-shot url="h
-
-
テキストに動きをつけるプラグイン
テキストをフェイド・スライド「Textillate」 テキストをフェイドイン(アウト)、スライドイン(アウト)してくれます。 ダウンロード デモ My Tit
- PREV
- 「まげでらんに」を応援!
- NEXT
- Skype 特定の機能を無効に




Comment
[…] [使い方] テキストボックスの入力値を数値限定にしてくれる「jQuery – numeric」 […]
テキストボックスの入力値を数値限定にしてくれる「jQuery - numeric」 http://t.co/TiUYLmymIz
入力フォームの数値のみ入力は、jQuery系プラグインで回避した。(htmlの拡張タグnumberではIE9がNGだった)http://t.co/pGc3jFZ0X5
jQuery | テキストボックスの入力値を数値限定にしてくれる「jQuery – numeric」 | Think deeply, Do less, More effective
[Reader Starred] jQuery | テキストボックスの入力値を数値限定にしてくれる「jQuery – numeric」 | Think deeply, Do less, More effective B! http://t.co/WAsfoFTxdN
via My Reading List: Unread http://readitlaterlist.com/users/atsystem/feed/unread
jQuery: テキストボックスの入力値を数値限定にしてくれる「jQuery ? numeric」 | Think deeply, Do less, More effective http://bit.ly/ZfZwnK