LoginSignup
3
3

More than 5 years have passed since last update.

jQueryで文字数チェッカーの作り方

Posted at

Javascipt初心者で、最近バグ対応などでJavascriptのコードを見ることが多く、これは自主的に触らないと話にならないと、コツコツ触り始めました。

そこで、今回はチュートリアル的な感覚で文字数チェッカーを作成しました。

まず、HTMLから

string_count.html
<!doctype html>
<html lang="ja">
<html>
  <head>
    <meta charset="utf-8" />
    <script src="http://code.jquery.com/jquery-1.11.1.min.js"></script> <script src="./string_count.js"></script>
</head>
<body>
    <textarea id="field" cols ="30" rows="3"></textarea>
    <p id="strlength">140</p>#入力数を表示
</body>
</html>

質素なテキストエリアです。



140



3
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
3