https://www.w3schools.com/bootstrap/bootstrap_tables.asp Bootstrap Tables W3Schools offers free online tutorials, references and exercises in all the major languages of the web. Covering popular subjects like HTML, CSS, JavaScript, Python, SQL, Java, and many, many more. www.w3schools.com Basic Table The .table class adds basic styling (light padding and only horizontal dividers) to a table: Fir..
아래 페이지에 다양한 버튼들이 나와있다. https://www.w3schools.com/bootstrap/bootstrap_buttons.asp Bootstrap Buttons W3Schools offers free online tutorials, references and exercises in all the major languages of the web. Covering popular subjects like HTML, CSS, JavaScript, Python, SQL, Java, and many, many more. www.w3schools.com button style Basic Default Primary Success Info Warning Danger Link Link Button But..
Bootstrap은 HTML, CSS, JavaScript Framework로 Bootstrap 3, 4, 5가 있다. 웹페이지 개발 시 frontend(UI, View)단을 구현하기 위한 무료 오픈소스이다. 주로 CSS, 레이아웃, 반응형 웹 구현 시 많이 사용한다. https://www.w3schools.com/bootstrap/bootstrap_ver.asp W3Schools Free Online Web Tutorials W3Schools offers free online tutorials, references and exercises in all the major languages of the web. Covering popular subjects like HTML, CSS, JavaScript,..
callback 함수를 통해 json 데이터를 받아오자 * JSON 데이터 받아오기 * $.getJSON 함수에 매개변수로 함수를 사용하였다. 이것이 callback 함수이다. 앞서 했던 방식과는 달리 error 발생 시 동작하는 함수가 없기 때문에 json 파일명을 다르게 주는 등 에러가 발생해도 동작되는 것은 없다. callback 함수에는 앞에서 성공 시 동작하는 함수와 동일하게 작성해주었다. append 함수 위에 empty 함수를 작성했기 때문에 데이터가 쌓이지는 않는다.
sungjuks.json [ {"name":"John", "id":"itwill", "kor":70, "eng":80, "mat":90}, {"name":"Tom", "id":"user1", "kor":75, "eng":80, "mat":95}, {"name":"Michael", "id":"python", "kor":60, "eng":40, "mat":30} ] 이번에는 3개씩 가져오는 것을 해보자 * JSON 데이터 받아오기 * each 반복문은 result에서 요소 하나를 꺼내서 fucntion을 실행하는 것을 반복한다.
json 데이터를 받아오기 위해 우선 json 파일을 준비하자 sungjuk.json [ {"name":"John", "id":"itwill", "kor":70, "eng":80, "mat":90} ] * JSON 데이터 받아오기 * 서버로부터 함수가 응답을 받는다. * JSON 데이터 받아오기 * 댓글 더보기는 더보기 버튼을 클릭하면 아래로 댓글들이 계속 쌓인다. 이렇게 한번 해보자 $("#panel").html(str); html 함수 대신 append 함수를 사용하면 된다. $("#panel").append(str);