function createList(localtext) {
  section.setAttribute("class", "section");
  warnTxt.setAttribute("class", "warn-txt");
.
.
.
}

에러 문구 발생 후, 아이템을 입력했을때, 다시 원래대로 돌아가기 위해 에러 class가 없는 기본 class를 붙여준다.