Skip to content

Instantly share code, notes, and snippets.

@codingwithsara
Created August 1, 2019 23:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save codingwithsara/d1a2ea7970cd840dc97e0ccf5fe94a9b to your computer and use it in GitHub Desktop.
Save codingwithsara/d1a2ea7970cd840dc97e0ccf5fe94a9b to your computer and use it in GitHub Desktop.
jQuery Text Counter
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="utf-8">
<title>テキストカウンター</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
</head>
<body>
<div class="container">
<form>
<div class="form-group">
<label>文字数カウントアップ</label>
<textarea id="countUp" class="form-control" rows="5"></textarea>
<span id="count1" class="float-right">0</span>
</div>
<div class="form-group">
<label>文字数カウントダウン</label>
<textarea id="countDown" class="form-control" rows="5"></textarea>
<span id="count2" class="float-right">30</span>
</div>
</form>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment