치환 (1) 썸네일형 리스트형 문자열 치환 // fnReplace(원본 문자열, 변경대상 문자열, 변경할 문자열) function fnReplace(str, str1, str2) { var pattern = new RegExp(str1, "gi"); return String(str).replace(pattern, str2); } function replaceText() { document.getElementById("tmp2").value = fnReplace(document.getElementById("tmp").value, " 이전 1 다음