리자

플리커 이미지 랜덤 출력하기

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<head>
  <script src="http://code.jquery.com/jquery-latest.js"></script>
 
  <script>
  $(document).ready(function(){
    var page = Math.round(Math.random() * 2000);
    $.getJSON("http://api.flickr.com/services/rest/?method=flickr.photos.search&api_key=자신의 API KEY&text=cat,pet&per_page=1&page="+page+"&machine_tag_mode=all&format=json&jsoncallback=?",

        function(data){
            $("<img/>")
                .attr("id", "flickr")
                .attr("border", "0px")
                .attr("src", "http://farm"+data.photos.photo[0].farm+".static.flickr.com/"+data.photos.photo[0].server+"/"+data.photos.photo[0].id+"_"+data.photos.photo[0].secret+"_m.jpg")
                .appendTo("#images");
            $("#flickr").wrap("<a href='http://www.flickr.com/photos/"+data.photos.photo[0].owner+"/"+data.photos.photo[0].id+"' target='_blank'></a>");
        });
  });
  </script>
</head>
<body>
  <div id="images">
  </div>
</body>
</html>


&text= 컴마로 구분하여 출력하고 싶은 사진의 이름을 입력하면 됩니다. (영문)

[이 게시물은 관리자님에 의해 2011-10-31 16:55:28 jQuery에서 이동 됨]
|

댓글 5개

오오.. 굳..
오오오오오오 원하던거~~
좋은 정보 감사합니다. ^^
오오~ 좋은 정보 고맙습니다.~~
댓글을 작성하시려면 로그인이 필요합니다.

프로그램

+
제목 글쓴이 날짜 조회
15년 전 조회 4,621
15년 전 조회 1,729
15년 전 조회 2,001
15년 전 조회 1,987
15년 전 조회 1,982
15년 전 조회 1,472
15년 전 조회 1,709
15년 전 조회 1,850
15년 전 조회 1,780
15년 전 조회 2,480
15년 전 조회 1,644
15년 전 조회 1,757
15년 전 조회 1,240
15년 전 조회 1,341
15년 전 조회 1,328
15년 전 조회 1,284
15년 전 조회 1,238
15년 전 조회 1,282
15년 전 조회 1,418
15년 전 조회 1,463
15년 전 조회 2,959
15년 전 조회 1,298
15년 전 조회 1,951
15년 전 조회 1,831
15년 전 조회 1,963
15년 전 조회 1,655
15년 전 조회 2,164
15년 전 조회 964
15년 전 조회 1,439
15년 전 조회 1,416
15년 전 조회 3,190
15년 전 조회 3,562
15년 전 조회 2,239
15년 전 조회 1,703
15년 전 조회 2,315
15년 전 조회 1,804
15년 전 조회 1,429
15년 전 조회 4,119
15년 전 조회 1,780
15년 전 조회 1,845
15년 전 조회 3,131
15년 전 조회 1,818
15년 전 조회 4,513
15년 전 조회 2,716
15년 전 조회 3,497
15년 전 조회 2,124
15년 전 조회 2,354
15년 전 조회 1,650
15년 전 조회 4,704
15년 전 조회 4,341
15년 전 조회 4,148
16년 전 조회 5,547
16년 전 조회 3,769
16년 전 조회 2,142
16년 전 조회 2,089
16년 전 조회 2,236
16년 전 조회 1,929
16년 전 조회 4,362
16년 전 조회 3,268
16년 전 조회 2,433
16년 전 조회 2,019
16년 전 조회 2,216
16년 전 조회 2,719
16년 전 조회 1,799
16년 전 조회 2,731
16년 전 조회 2,052
16년 전 조회 2,190
16년 전 조회 1,827
16년 전 조회 2,531
16년 전 조회 1,846
16년 전 조회 2,271
16년 전 조회 2,429
16년 전 조회 1,523
16년 전 조회 1,588
16년 전 조회 2,241
16년 전 조회 5,658
16년 전 조회 1,958
16년 전 조회 2,480
16년 전 조회 2,678
16년 전 조회 1,839
16년 전 조회 1,617
16년 전 조회 2,549
16년 전 조회 5,264
16년 전 조회 2,538
16년 전 조회 3,196
16년 전 조회 2,065
16년 전 조회 3,936
16년 전 조회 4,767
16년 전 조회 3,404
16년 전 조회 2,640
16년 전 조회 2,751
16년 전 조회 2,983
16년 전 조회 2,498
16년 전 조회 5,865
16년 전 조회 3,685
16년 전 조회 1,675
16년 전 조회 2,016
16년 전 조회 5,378
16년 전 조회 2,641
16년 전 조회 3,706