-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathchecker.html
33 lines (29 loc) · 1.56 KB
/
checker.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>84字チェッカー</title>
<script>
function check() {
const text = document.getElementById("input").value;
const not_84 = [...text].filter(c => c.match(/[^人我汝此其彼心善悪何無在言於学為之処乎極噫筆国力須口行来上下左右時手足銭即而与受日月星火水風母父全等加別同一二三四五六七八九十百始終生入冠皇神大小多少色赤青白黒地片貧故]/) && c.match(/[\u3400-\u4DBF\u4e00-\u9fff]/));
if (not_84.length) {
document.getElementById("output").textContent = `【${not_84.join("")}】は 84 燐字に該当しません`;
document.getElementsByTagName("body")[0].style.backgroundColor = "#faf47d";
} else {
document.getElementById("output").textContent = "";
document.getElementsByTagName("body")[0].style.backgroundColor = "#ffffff";
}
}
</script>
</head>
<body>
<h1>84字チェッカー</h1>
<p>【人我汝此其彼心善悪何無在言於学為之処乎極噫筆国力須口行来上下左右時手足銭即而与受日月星火水風母父全等加別同一二三四五六七八九十百始終生入冠皇神大小多少色赤青白黒地片貧故】にマッチしない CJK 統合漢字および CJK
統合漢字拡張 A を探して警告するツール </p>
<textarea id="input" cols="60" rows="10" oninput="check()"></textarea><br>
<div id="output"></div>
</body>
</html>