function trim(txt){
    return txt.replace(/(^\s*)|(\s*$)/g, "");
}

 

------------------------------------------------------------------------

 

if(trim(document.all.name.value) == ""){

alert("이름을 입력해주세요.");

}

 

 

+ Recent posts