리자

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

<!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,317
15년 전 조회 1,442
15년 전 조회 1,732
15년 전 조회 1,706
15년 전 조회 1,705
15년 전 조회 1,203
15년 전 조회 1,441
15년 전 조회 1,578
15년 전 조회 1,497
15년 전 조회 2,212
15년 전 조회 1,355
15년 전 조회 1,425
15년 전 조회 973
15년 전 조회 1,066
15년 전 조회 1,040
15년 전 조회 993
15년 전 조회 946
15년 전 조회 1,016
15년 전 조회 1,155
15년 전 조회 1,165
15년 전 조회 2,701
15년 전 조회 1,018
15년 전 조회 1,672
15년 전 조회 1,540
15년 전 조회 1,669
15년 전 조회 1,374
15년 전 조회 1,871
15년 전 조회 679
15년 전 조회 1,167
15년 전 조회 1,136
15년 전 조회 2,924
15년 전 조회 3,245
15년 전 조회 1,915
15년 전 조회 1,429
15년 전 조회 2,038
15년 전 조회 1,554
15년 전 조회 1,151
15년 전 조회 3,844
15년 전 조회 1,486
15년 전 조회 1,588
15년 전 조회 2,809
15년 전 조회 1,503
15년 전 조회 4,235
15년 전 조회 2,452
15년 전 조회 3,227
15년 전 조회 1,838
15년 전 조회 2,071
15년 전 조회 1,373
15년 전 조회 4,447
15년 전 조회 4,031
15년 전 조회 3,855
15년 전 조회 5,271
15년 전 조회 3,499
15년 전 조회 1,878
15년 전 조회 1,816
15년 전 조회 1,962
15년 전 조회 1,668
15년 전 조회 4,064
15년 전 조회 2,990
15년 전 조회 2,158
16년 전 조회 1,746
16년 전 조회 1,979
16년 전 조회 2,464
16년 전 조회 1,536
16년 전 조회 2,472
16년 전 조회 1,804
16년 전 조회 1,913
16년 전 조회 1,547
16년 전 조회 2,255
16년 전 조회 1,581
16년 전 조회 1,995
16년 전 조회 2,182
16년 전 조회 1,250
16년 전 조회 1,324
16년 전 조회 1,968
16년 전 조회 5,406
16년 전 조회 1,713
16년 전 조회 2,233
16년 전 조회 2,428
16년 전 조회 1,572
16년 전 조회 1,372
16년 전 조회 2,295
16년 전 조회 5,009
16년 전 조회 2,281
16년 전 조회 2,935
16년 전 조회 1,821
16년 전 조회 3,667
16년 전 조회 4,511
16년 전 조회 3,163
16년 전 조회 2,418
16년 전 조회 2,510
16년 전 조회 2,751
16년 전 조회 2,245
16년 전 조회 5,585
16년 전 조회 3,437
16년 전 조회 1,429
16년 전 조회 1,771
16년 전 조회 5,145
16년 전 조회 2,388
16년 전 조회 3,481