1
<SCRIPT language="JavaScript">
2
<!--
3
function countCharacters(str){
4
var totalCount = 0;
5
for (var i=0; i<str.length; i++) {
6
var c = str.charCodeAt(i);
7
if ((c >= 0x0001 && c <= 0x007e) || (0xff60<=c && c<=0xff9f)) {
8
totalCount++;
9
}else {
10
totalCount+=2;
11
}
12
}
13
// alert(totalCount);
14
return totalCount;
15
}
16
//-->
17
</SCRIPT>

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17
