'trim'에 해당되는 글 1건

[js부분]
String.prototype.trim = function(){

	return this.replace(/(^\s*)|(\s*$)/gi, "");

}

[사용법]
aa = '    앞공백뒷공백    ';

document.write(aa.trim());

[결과]
'앞공백뒷공백'

블로그 이미지

2010년1월어느날..

,