리자

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

<!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,750
15년 전 조회 1,846
15년 전 조회 2,132
15년 전 조회 2,131
15년 전 조회 2,109
15년 전 조회 1,593
15년 전 조회 1,856
15년 전 조회 1,969
15년 전 조회 1,930
15년 전 조회 2,630
15년 전 조회 1,774
15년 전 조회 1,866
15년 전 조회 1,368
15년 전 조회 1,466
15년 전 조회 1,478
15년 전 조회 1,407
15년 전 조회 1,371
15년 전 조회 1,408
15년 전 조회 1,570
15년 전 조회 1,577
15년 전 조회 3,079
15년 전 조회 1,413
15년 전 조회 2,075
15년 전 조회 1,926
15년 전 조회 2,079
15년 전 조회 1,786
15년 전 조회 2,282
15년 전 조회 1,077
15년 전 조회 1,584
15년 전 조회 1,552
15년 전 조회 3,342
15년 전 조회 3,680
15년 전 조회 2,376
15년 전 조회 1,836
15년 전 조회 2,442
15년 전 조회 1,937
15년 전 조회 1,554
15년 전 조회 4,239
15년 전 조회 1,892
15년 전 조회 1,984
15년 전 조회 3,246
15년 전 조회 1,940
15년 전 조회 4,648
15년 전 조회 2,844
15년 전 조회 3,643
15년 전 조회 2,248
15년 전 조회 2,480
15년 전 조회 1,783
15년 전 조회 4,852
15년 전 조회 4,465
16년 전 조회 4,259
16년 전 조회 5,679
16년 전 조회 3,901
16년 전 조회 2,257
16년 전 조회 2,211
16년 전 조회 2,371
16년 전 조회 2,064
16년 전 조회 4,496
16년 전 조회 3,397
16년 전 조회 2,561
16년 전 조회 2,151
16년 전 조회 2,362
16년 전 조회 2,863
16년 전 조회 1,951
16년 전 조회 2,871
16년 전 조회 2,194
16년 전 조회 2,317
16년 전 조회 1,945
16년 전 조회 2,663
16년 전 조회 1,971
16년 전 조회 2,397
16년 전 조회 2,568
16년 전 조회 1,635
16년 전 조회 1,704
16년 전 조회 2,380
16년 전 조회 5,792
16년 전 조회 2,101
16년 전 조회 2,630
16년 전 조회 2,807
16년 전 조회 1,964
16년 전 조회 1,750
16년 전 조회 2,665
16년 전 조회 5,394
16년 전 조회 2,653
16년 전 조회 3,316
16년 전 조회 2,186
16년 전 조회 4,072
16년 전 조회 4,871
16년 전 조회 3,519
16년 전 조회 2,774
16년 전 조회 2,893
16년 전 조회 3,104
16년 전 조회 2,624
16년 전 조회 5,969
16년 전 조회 3,796
16년 전 조회 1,794
16년 전 조회 2,123
16년 전 조회 5,492
16년 전 조회 2,751
16년 전 조회 3,817