forked from hjh010501/neis-counter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
71 lines (71 loc) ยท 4.57 KB
/
index.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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<html lang="ko">
<head>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no">
<meta name="description" content="๋์ด์ค(NEIS) ๊ธ์์ ๊ณ์ฐ๊ธฐ">
<meta property="og:title" content="๋์ด์ค(NEIS) ๊ธ์์ ๊ณ์ฐ๊ธฐ">
<meta property="og:type" content="website">
<meta property="og:url" content="https://hjh010501.github.io/neis-counter">
<meta property="og:locale" content="ko_KR">
<meta property="og:description" content="๋์ด์ค(NEIS) ๊ธ์์ ๊ณ์ฐ๊ธฐ">
<meta property="og:image" content="ogimage.png">
<meta property="og:image:type" content="image/png">
<meta property="og:image:width" content="1200">
<meta property="og:image:height" content="630">
<link rel="stylesheet" type="text/css" href="main.css">
<script async defer src="https://buttons.github.io/buttons.js"></script>
<title>๋์ด์ค(NEIS) ๊ธ์์ ๊ณ์ฐ๊ธฐ</title>
</head>
<body>
<div class="center">
<div class="title">๐๋์ด์ค(NEIS) ๊ธ์์ ๊ณ์ฐ๊ธฐ</div>
<div class="title_underbar"></div>
<textarea oninput="counter(document.getElementById('counter').value)" id="counter" class="counter" cols="40" rows="5"></textarea>
<table>
<tr>
<th>ํญ๋ชฉ</td>
<th>์ง๋กํฌ๋ง์ฌํญ</th>
<th>์์จ</th>
<th>๋์๋ฆฌ</th>
<th>๋ด์ฌ</th>
<th>์ง๋ก</th>
<th>๊ต๊ณผ์ธํน</th>
<th>๊ฐ์ธ๋ณ์ธํน</th>
</tr>
<tr>
<td>๋ฐ์ดํธ</td>
<td>600</td>
<td>3000</td>
<td>1500</td>
<td>1500</td>
<td>3000</td>
<td>1500</td>
<td>1500</td>
</tr>
</table>
<div id="result" class="result">0์, 0๋ฐ์ดํธ</div>
<span style="font-size: 12pt; color:#aaa; font-family: 'Noto Sans KR'; letter-spacing: -1.25px; float: right;">์์ด, ์ซ์, ํน์๋ฌธ์, ๋์ด์ฐ๊ธฐ 1๋ฐ์ดํธ / ์ํฐํค 2๋ฐ์ดํธ / ํ๊ธ 3๋ฐ์ดํธ</span>
</div>
<div class="footbar">
<div class="footbar_content">
<span style="text-align: left;">๐จโ๐ป by <a href="https://kidevelop.io">kidevelop</a></span>
<span style="float: right;"><a class="github-button" href="https://github.com/hjh010501/neis-counter" data-icon="octicon-star" data-size="large" data-show-count="true" aria-label="Star hjh010501/neis-counter on GitHub">Star</a></span>
</div>
</div>
<script>
function counter(content) {
console.log(content);
var english = content.replace(/[ใฑ-ใ
|ใ
-ใ
ฃ|๊ฐ-ํฃ]/gi, "").replace(/[0-9]/gi, "").replace(/[\{\}\[\]\/?.,;:|\)*~`!^\-_+<>@\#$%&\\\=\(\'\"]/gi, "").replace(/\s/gi, "").replace(/\s/gi, "").replace(/(\r\n\t|\n|\r\t)/gm,"");;
var korean = content.replace(/[a-zA-Z]/gi, "").replace(/[0-9]/gi, "").replace(/[\{\}\[\]\/?.,;:|\)*~`!^\-_+<>@\#$%&\\\=\(\'\"]/gi, "").replace(/\s/gi, "").replace(/(\r\n\t|\n|\r\t)/gm,"");
var number = content.replace(/[a-zA-Z]/gi, "").replace(/[ใฑ-ใ
|ใ
-ใ
ฃ|๊ฐ-ํฃ]/gi, "").replace(/[\{\}\[\]\/?.,;:|\)*~`!^\-_+<>@\#$%&\\\=\(\'\"]/gi, "").replace(/\s/gi, "").replace(/(\r\n\t|\n|\r\t)/gm,"");
var special = content.replace(/[a-zA-Z]/gi, "").replace(/[ใฑ-ใ
|ใ
-ใ
ฃ|๊ฐ-ํฃ]/gi, "").replace(/[0-9]/gi, "").replace(/\s/gi, "").replace(/(\r\n\t|\n|\r\t)/gm,"");
var space = content.replace(/[a-zA-Z]/gi, "").replace(/[ใฑ-ใ
|ใ
-ใ
ฃ|๊ฐ-ํฃ]/gi, "").replace(/[\{\}\[\]\/?.,;:|\)*~`!^\-_+<>@\#$%&\\\=\(\'\"]/gi, "").replace(/[0-9]/gi, "").replace(/(\r\n\t|\n|\r\t)/gm,"");
var line = content.replace(/[a-zA-Z]/gi, "").replace(/[ใฑ-ใ
|ใ
-ใ
ฃ|๊ฐ-ํฃ]/gi, "").replace(/[\{\}\[\]\/?.,;:|\)*~`!^\-_+<>@\#$%&\\\=\(\'\"]/gi, "").replace(/[0-9]/gi, "").replace(/ /gi, "");
var result = english.length + (korean.length * 3) + number.length + special.length + space.length + (line.length * 2);
document.getElementById('result').innerHTML = "๊ณต๋ฐฑ ์ ์ธ " + content.replace(/(\r\n\t|\n|\r\t)/gm,"").replace(/ /gi, "").length + "์, " + result + "๋ฐ์ดํธ";
}
</script>
</body>
</html>