Get
-
Ajax) get방식/ post 방식 데이터를 받기Front/js 2024. 7. 10. 12:36
▤ 목차" data-ke-type="html">HTML 삽입미리보기할 수 없는 소스 ✔ 기본적인 세팅get 방식과 post 방식 모두, 서버에 요청을 하는 메서드이다.이때 get 방식은 url뒤에 붙여서 보낸다. ⌨ html 파일Ajax get,post 요청이름: 나이: 이렇게 get 버튼을 누르면 get방식으로 post 버튼을 누르면 post 방식으로 데이터를 넘기도록 하겠다. 💻 getpost.jsp ✔ get 방식⌨ 코드let xhr;function getFunc(){ //alert('a'); let irum = frm.name.value; let nai = frm.age.value; //alert(irum+" " +nai); fName="getpost.jsp?name="+..