리자

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

<!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,217
15년 전 조회 1,348
15년 전 조회 1,641
15년 전 조회 1,606
15년 전 조회 1,602
15년 전 조회 1,104
15년 전 조회 1,352
15년 전 조회 1,493
15년 전 조회 1,396
15년 전 조회 2,125
15년 전 조회 1,269
15년 전 조회 1,323
15년 전 조회 869
15년 전 조회 983
15년 전 조회 945
15년 전 조회 912
15년 전 조회 860
15년 전 조회 921
15년 전 조회 1,066
15년 전 조회 1,085
15년 전 조회 2,603
15년 전 조회 932
15년 전 조회 1,584
15년 전 조회 1,453
15년 전 조회 1,573
15년 전 조회 1,282
15년 전 조회 1,769
15년 전 조회 591
15년 전 조회 1,079
15년 전 조회 1,048
15년 전 조회 2,839
15년 전 조회 3,152
15년 전 조회 1,830
15년 전 조회 1,336
15년 전 조회 1,953
15년 전 조회 1,459
15년 전 조회 1,062
15년 전 조회 3,757
15년 전 조회 1,399
15년 전 조회 1,496
15년 전 조회 2,723
15년 전 조회 1,424
15년 전 조회 4,149
15년 전 조회 2,361
15년 전 조회 3,141
15년 전 조회 1,758
15년 전 조회 1,986
15년 전 조회 1,286
15년 전 조회 4,364
15년 전 조회 3,937
15년 전 조회 3,766
15년 전 조회 5,181
15년 전 조회 3,401
15년 전 조회 1,782
15년 전 조회 1,743
15년 전 조회 1,887
15년 전 조회 1,581
15년 전 조회 3,978
15년 전 조회 2,892
15년 전 조회 2,078
15년 전 조회 1,655
15년 전 조회 1,891
15년 전 조회 2,371
15년 전 조회 1,456
15년 전 조회 2,390
15년 전 조회 1,724
15년 전 조회 1,820
15년 전 조회 1,474
15년 전 조회 2,164
15년 전 조회 1,493
15년 전 조회 1,908
15년 전 조회 2,101
15년 전 조회 1,178
15년 전 조회 1,236
15년 전 조회 1,880
15년 전 조회 5,325
16년 전 조회 1,627
16년 전 조회 2,135
16년 전 조회 2,336
16년 전 조회 1,484
16년 전 조회 1,293
16년 전 조회 2,207
16년 전 조회 4,922
16년 전 조회 2,199
16년 전 조회 2,856
16년 전 조회 1,736
16년 전 조회 3,588
16년 전 조회 4,426
16년 전 조회 3,095
16년 전 조회 2,340
16년 전 조회 2,420
16년 전 조회 2,671
16년 전 조회 2,158
16년 전 조회 5,500
16년 전 조회 3,351
16년 전 조회 1,344
16년 전 조회 1,689
16년 전 조회 5,060
16년 전 조회 2,297
16년 전 조회 3,400
🐛 버그신고