clover__ 2013. 5. 10. 11:04

 if (Form.txtUserID.value.replace(/\s/g, "") == "") {

\s : 공백
g : 전체검색 (global)

txtUserID.replace(/\s/g, ""); 

=> 문자열 txtUserID에 있는 모든 공백을 없앤다.

728x90
반응형
LIST