PageSourceSearch

https://www.tokachiinn.jp/inquiry/js/textcount.js

js tokachiinn.jp collected 2026-10-04 13:21:46 UTC 792 bytes, 24 lines download raw bytes

1$(function(){
2    var countMax = 1000;/*上限文字数を設定*/
3    var txt = $('textarea').val(),
4        new_txt = $.trim(txt.replace(/\n/g, "")),
5        countDown = countMax - new_txt.length;
6 
7    $('.count').html("残り" + countDown + "文字");
8 
9    $('textarea').bind('keydown keyup keypress change',function(){
10        var txt = $(this).val(),
11            new_txt = $.trim(txt.replace(/\n/g, "")),
12            countDown = countMax - new_txt.length;
13 
14        $('.count').html("残り" + countDown + "文字");
15  
16        if(countDown < 0){
17            $('.count').css({color:'#ff0000'});
18            $('.count').html("OK!");
19        } else {
20            $('.count').css({color:'#000000'});
21            $('.count').html("残り" + countDown + "文字");
22        }
23    });
24});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.