<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title> New Document </title>
<meta name="Generator" content="EditPlus">
<meta name="Author" content="">
<meta name="Keywords" content="">
<meta name="Description" content="">
</head>
<body>
<script type="text/javascript">
function fc_chk_byte(aro_name,ari_max) {
var ls_str = aro_name.value;
var li_str_len = ls_str.length;
var li_max = ari_max;
var i = li_byte = li_len = 0;
var ls_one_char = ls_str2 = "";
for(i=0; i< li_str_len; i++) {
ls_one_char = ls_str.charAt(i);
li_byte++;
if(li_byte <= li_max){
li_len = i + 1;
}
}
if(li_byte > li_max) {
alert( li_max + "byte, 초과 ");
ls_str2 = ls_str.substr(0, li_len);
aro_name.value = ls_str2;
document.cmt_frm.char_byte.value = 80;
}else {
document.cmt_frm.char_byte.value = li_byte;
}
aro_name.focus();
}
</script>
<form method='post' name="cmt_frm">
<textarea name="wr_content" id="wr_content" rows="12" cols="52" onkeyup="fc_chk_byte(this, 80)"></textarea> <br />
<input type="hidden" size="2" name="char_byte" id="char_byte" />
</form>
</body>
</html>