리자

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

<!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,219
15년 전 조회 1,349
15년 전 조회 1,642
15년 전 조회 1,609
15년 전 조회 1,604
15년 전 조회 1,105
15년 전 조회 1,353
15년 전 조회 1,494
15년 전 조회 1,398
15년 전 조회 2,126
15년 전 조회 1,270
15년 전 조회 1,324
15년 전 조회 870
15년 전 조회 984
15년 전 조회 945
15년 전 조회 912
15년 전 조회 861
15년 전 조회 922
15년 전 조회 1,067
15년 전 조회 1,086
15년 전 조회 2,604
15년 전 조회 932
15년 전 조회 1,584
15년 전 조회 1,454
15년 전 조회 1,574
15년 전 조회 1,283
15년 전 조회 1,769
15년 전 조회 592
15년 전 조회 1,079
15년 전 조회 1,048
15년 전 조회 2,840
15년 전 조회 3,154
15년 전 조회 1,831
15년 전 조회 1,337
15년 전 조회 1,955
15년 전 조회 1,461
15년 전 조회 1,063
15년 전 조회 3,757
15년 전 조회 1,399
15년 전 조회 1,497
15년 전 조회 2,725
15년 전 조회 1,426
15년 전 조회 4,151
15년 전 조회 2,363
15년 전 조회 3,141
15년 전 조회 1,760
15년 전 조회 1,987
15년 전 조회 1,287
15년 전 조회 4,365
15년 전 조회 3,939
15년 전 조회 3,767
15년 전 조회 5,182
15년 전 조회 3,401
15년 전 조회 1,782
15년 전 조회 1,745
15년 전 조회 1,888
15년 전 조회 1,582
15년 전 조회 3,981
15년 전 조회 2,893
15년 전 조회 2,078
15년 전 조회 1,656
15년 전 조회 1,892
15년 전 조회 2,373
15년 전 조회 1,457
15년 전 조회 2,391
15년 전 조회 1,725
15년 전 조회 1,820
15년 전 조회 1,475
15년 전 조회 2,164
15년 전 조회 1,495
15년 전 조회 1,908
15년 전 조회 2,102
15년 전 조회 1,178
15년 전 조회 1,238
15년 전 조회 1,882
15년 전 조회 5,326
16년 전 조회 1,628
16년 전 조회 2,136
16년 전 조회 2,336
16년 전 조회 1,486
16년 전 조회 1,294
16년 전 조회 2,208
16년 전 조회 4,924
16년 전 조회 2,200
16년 전 조회 2,856
16년 전 조회 1,737
16년 전 조회 3,589
16년 전 조회 4,426
16년 전 조회 3,095
16년 전 조회 2,342
16년 전 조회 2,422
16년 전 조회 2,672
16년 전 조회 2,159
16년 전 조회 5,502
16년 전 조회 3,352
16년 전 조회 1,345
16년 전 조회 1,690
16년 전 조회 5,061
16년 전 조회 2,297
16년 전 조회 3,402
🐛 버그신고