フォームに入力した文字数カウントを表示「a2x text counter」 - jQueryプラグイン
当ページのリンクには広告が含まれています。
スポンサーリンク
入力フォームに入力した文字数カウントを表示する「a2x text counter」を紹介します。
a2x text counter
input や textarea といった入力フォーム要素を指定するだけど、フォームに入力した文字数をリアルタイムにカウント・表示してくれます。
スポンサーリンク
デモのフォームに文字を入力してみてください。
ソース(HTML + jQuery)
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<meta name="description" content="a2x text counterのデモでーす。">
<title>webTicker - jQuery Plugin Demo</title>
<link rel="stylesheet" href="a2x-text-counter.jquery.plugin.css" type="text/css" media="screen">
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script src="a2x-text-counter.jquery.plugin.js"></script>
<script>
$(function(){
$("#element").a2xCounter();
});
</script>
</head>
<body>
<h1>a2x text counter のデモでーす。</h1>
<textarea id="element"></textarea>
</body>
</html>
スポンサーリンク