ajax를 이용하는 도중 하나 이상의 값을 반환 받을시 각각의 input 에 입력시켜줘야하는데 ajax를 잘몰라서 쓴 방법 // 반환 받은 값 txt var txt = xhr.responseText; // 반환 받은 값에 "|(파이프)"을 구분자로 지정 copy = txt.split("|"); document.getElementById('input_id1').value = copy[0]; document.getElementById('input_id2').value = copy[1];