jQuery $.getJSON()

Jmnote (토론 | 기여)님의 2019년 3월 27일 (수) 19:33 판 (새 문서: {{소문자}} ==개요== ;jQuery $.getJSON() <source lang='javascript'> <script src="//code.jquery.com/jquery.min.js"></script> <script> $.getJSON( "//raw.githubusercontent.com/jmnote...)
(차이) ← 이전 판 | 최신판 (차이) | 다음 판 → (차이)

1 개요

jQuery $.getJSON()
<script src="//code.jquery.com/jquery.min.js"></script>
<script>
$.getJSON( "//raw.githubusercontent.com/jmnote/test1/master/john1.json", function( data ) {
	console.log(data); // {firstName: "John", lastName: "Smith", isAlive: true, age: 27}
	console.log(data.firstName); // John
	console.log(data.age); // 27
});
</script>

2 같이 보기

3 참고

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}