比較検索なら 天秤AI byGMO
サイトやツールを別言語に変更する

サイトやツールを別言語に変更する

自分のサイト,ツール等を別の言語に変更できます

0
0
40
0

投稿日時:

  • プロンプト実行例
サイトやツールを別言語に変更する

あなたのサイトやツールを別言語に変更します。

<!DOCTYPE html> <html lang="ja"> <head> <meta charset="UTF-8"> <title>文字数カウントツール</title> <script> function countCharacters() { var inputText = document.getElementById("input").value;

var charCount = inputText.length; var charCountNoSpace = inputText.replace(/\s/g, '').length; var wordCount = inputText.trim().split(/\s+/).length; var lineBreakCount = (inputText.match(/\n/g) || []).length; var alphabetCount = inputText.replace(/[^A-Za-z]/g, '').length; var numberCount = inputText.replace(/[^0-9]/g, '').length; var hiraganaCount = inputText.replace(/[^ぁ-んァ-ン]/g, '').length; var katakanaCount = inputText.replace(/[^ァ-ン]/g, '').length; var punctuationCount = inputText.replace(/[^。、.,-]/g, '').length; var symbolCount = inputText.replace(/[^!-]/g, '').length; var kanjiCount = inputText.replace(/[^一-龠々]/g, '').length; var urlCount = inputText.split('http').length - 1; var utf8ByteCount = new Blob([inputText], {type: 'plain/text'}).size; var shiftJISByteCount = unescape(encodeURIComponent(inputText)).length; var jisByteCount = inputText.replace(/[^ -。-゚]/g, '').length; var eucJPByteCount = encodeURIComponent(inputText).replace(/%[A-F\d]{2}/g, 'U').length;

var charPerPage = parseFloat(document.getElementById("charPerPage").value); var includeHalfWidth = document.getElementById("includeHalfWidth").checked;

var pageCount = Math.ceil(charCount / charPerPage); if (includeHalfWidth) { charCount += inputText.replace(/[^\x01-\x7E]/g, '').length * -0.5; }

document.getElementById("charCount").textContent = charCount; document.getElementById("charCountNoSpace").textContent = charCountNoSpace; document.getElementById("wordCount").textContent = wordCount; document.getElementById("lineBreakCount").textContent = lineBreakCount; document.getElementById("alphabetCount").textContent = alphabetCount; document.getElementById("numberCount").textContent = numberCount; document.getElementById("hiraganaCount").textContent = hiraganaCount; document.getElementById("katakanaCount").textContent = katakanaCount; document.getElementById("punctuationCount").textContent = punctuationCount; document.getElementById("symbolCount").textContent = symbolCount; document.getElementById("kanjiCount").textContent = kanjiCount; document.getElementById("urlCount").textContent = urlCount; document.getElementById("utf8ByteCount").textContent = utf8ByteCount; document.getElementById("shiftJISByteCount").textContent = shiftJISByteCount; document.getElementById("jisByteCount").textContent = jisByteCount; document.getElementById("eucJPByteCount").textContent = eucJPByteCount; document.getElementById("pageCount").textContent = pageCount; } </script>

</head> <body> <textarea id="input" rows="10" cols="50" placeholder="ここにテキストを入力してください"></textarea> <br> <button onclick="countCharacters()">文字数をカウント</button> <br> <label for="charPerPage">1ページあたりの文字数: </label> <input type="number" id="charPerPage" value="400"> <label><input type="checkbox" id="includeHalfWidth">半角文字を0.5文字としてカウントする</label> <br> <p>文字数(スペース込み): <span id="charCount"></span></p> <p>文字数(スペース無視): <span id="charCountNoSpace"></span></p> <p>単語数: <span id="wordCount"></span></p> <p>改行コード数: <span id="lineBreakCount"></span></p> <p>英字数: <span id="alphabetCount"></span></p> <p>数字数: <span id="numberCount"></span></p> <p>ひらがな数: <span id="hiraganaCount"></span></p> <p>カタカナ数: <span id="katakanaCount"></span></p> <p>句読点数: <span id="punctuationCount"></span></p> <p>記号数: <span id="symbolCount"></span></p> <p>漢字数: <span id="kanjiCount"></span></p> <p>URL数: <span id="urlCount"></span></p> <p>UTF-8バイト数: <span id="utf8ByteCount"></span></p> <p>Shift_JISバイト数: <span id="shiftJISByteCount"></span></p> <p>JISバイト数: <span id="jisByteCount"></span></p> <p>EUC_JPバイト数: <span id="eucJPByteCount"></span></p> <p>原稿用紙何枚: <span id="pageCount"></span></p> </body> </html>
サイトやツールを別言語に変更する
html
1<!DOCTYPE html>
2<html lang="en">
3<head>
4  <meta charset="UTF-8">
5  <title>Character Count Tool</title>
6<script>
7function countCharacters() {
8  var inputText = document.getElementById("input").value;
9  
10  var charCount = inputText.length;
11  var charCountNoSpace = inputText.replace(/\s/g, '').length;
12  var wordCount = inputText.trim().split(/\s+/).length;
13  var lineBreakCount = (inputText.match(/\n/g) || []).length;
14  var alphabetCount = inputText.replace(/[^A-Za-z]/g, '').length;
15  var numberCount = inputText.replace(/[^0-9]/g, '').length;
16  var hiraganaCount = inputText.replace(/[^ぁ-んァ-ン]/g, '').length;
17  var katakanaCount = inputText.replace(/[^ァ-ン]/g, '').length;
18  var punctuationCount = inputText.replace(/[^。、.,\-]/g, '').length;
19  var symbolCount = inputText.replace(/[^!-~]/g, '').length;
20  var kanjiCount = inputText.replace(/[^一-龠々]/g, '').length;
21  var urlCount = inputText.split('http').length - 1;
22  var utf8ByteCount = new Blob([inputText], {type: 'plain/text'}).size;
23  var shiftJISByteCount = unescape(encodeURIComponent(inputText)).length;
24  var jisByteCount = inputText.replace(/[^ -~。-゚]/g, '').length;
25  var eucJPByteCount = encodeURIComponent(inputText).replace(/%[A-F\d]{2}/g, 'U').length;
26
27  var charPerPage = parseFloat(document.getElementById("charPerPage").value);
28  var includeHalfWidth = document.getElementById("includeHalfWidth").checked;
29
30  var pageCount = Math.ceil(charCount / charPerPage);
31  if (includeHalfWidth) {
32    charCount += inputText.replace(/[^\x01-\x7E]/g, '').length * -0.5;
33  }
34
35  document.getElementById("charCount").textContent = charCount;
36  document.getElementById("charCountNoSpace").textContent = charCountNoSpace;
37  document.getElementById("wordCount").textContent = wordCount;
38  document.getElementById("lineBreakCount").textContent = lineBreakCount;
39  document.getElementById("alphabetCount").textContent = alphabetCount;
40  document.getElementById("numberCount").textContent = numberCount;
41  document.getElementById("hiraganaCount").textContent = hiraganaCount;
42  document.getElementById("katakanaCount").textContent = katakanaCount;
43  document.getElementById("punctuationCount").textContent = punctuationCount;
44  document.getElementById("symbolCount").textContent = symbolCount;
45  document.getElementById("kanjiCount").textContent = kanjiCount;
46  document.getElementById("urlCount").textContent = urlCount;
47  document.getElementById("utf8ByteCount").textContent = utf8ByteCount;
48  document.getElementById("shiftJISByteCount").textContent = shiftJISByteCount;
49  document.getElementById("jisByteCount").textContent = jisByteCount;
50  document.getElementById("eucJPByteCount").textContent = eucJPByteCount;
51  document.getElementById("pageCount").textContent = pageCount;
52}
53</script>
54</head>
55<body>
56  <textarea id="input" rows="10" cols="50" placeholder="Enter text here"></textarea>
57  <br>
58  <button onclick="countCharacters()">Count Characters</button>
59  <br>
60  <label for="charPerPage">Characters Per Page: </label>
61  <input type="number" id="charPerPage" value="400">
62  <label><input type="checkbox" id="includeHalfWidth">Count half-width characters as 0.5 characters</label>
63  <br>
64  <p>Character Count (with spaces): <span id="charCount"></span></p>
65  <p>Character Count (without spaces): <span id="charCountNoSpace"></span></p>
66  <p>Word Count: <span id="wordCount"></span></p>
67  <p>Line Break Count: <span id="lineBreakCount"></span></p>
68  <p>Alphabet Count: <span id="alphabetCount"></span></p>
69  <p>Number Count: <span id="numberCount"></span></p>
70  <p>Hiragana Count: <span id="hiraganaCount"></span></p>
71  <p>Katakana Count: <span id="katakanaCount"></span></p>
72  <p>Punctuation Count: <span id="punctuationCount"></span></p>
73  <p>Symbol Count: <span id="symbolCount"></span></p>
74  <p>Kanji Count: <span id="kanjiCount"></span></p>
75  <p>URL Count: <span id="urlCount"></span></p>
76  <p>UTF-8 Byte Count: <span id="utf8ByteCount"></span></p>
77  <p>Shift_JIS Byte Count: <span id="shiftJISByteCount"></span></p>
78  <p>JIS Byte Count: <span id="jisByteCount"></span></p>
79  <p>EUC_JP Byte Count: <span id="eucJPByteCount"></span></p>
80  <p>Number of Manuscript Pages: <span id="pageCount"></span></p>
81</body>
82</html>

コメント 0

他のプロンプトもチェック