function CheckEmail(str)
{
   var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i
   if (filter.test(str)) { return true; }
   else { return false; }
}

2009/10/01 17:42 2009/10/01 17:42

strim

분류없음 2009/10/01 14:38
function strim(str) {
 var index, len;
 
 while(true) {
  index = str.indexOf(" ");
  if(index == -1) {
   break;
  }
  len = str.length;
 
  str = str.substring(0, index) + str.substring((index + 1), len);
 }
 
 return str;
}
2009/10/01 14:38 2009/10/01 14:38

function byteCheck(code){
 var code_byte = 0;
    for (var inx = 0; inx < code.value.length; inx++) {
        var oneChar = escape(code.value.charAt(inx));
        if ( oneChar.length == 1 ) {
            code_byte ++;
        } else if (oneChar.indexOf("%u") != -1) {
            code_byte += 2;
        } else if (oneChar.indexOf("%") != -1) {
            code_byte += oneChar.length/3;
        }
    }
    return code_byte;
}


var bt = byteCheck("안녕하세요?");

몇바이트인지 바이트수가 리턴됩니다.

[출처] 자바스크립트 바이트 수에 따른 체크 - javascript byte check|작성자 째즈

2008/07/24 10:23 2008/07/24 10:23
document.frames['category_choice'].window.category_form.Third.value

['category_choice'] 는 프레임명
category_form 는 위의 프레임내에 있는 폼이름
Third 는 위의 폼안에 있는 객체 이름
2008/03/13 11:45 2008/03/13 11:45