Guest User

Untitled

a guest
Feb 15th, 2014
174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5 1.34 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3.     <head>
  4.         <title>RGHOST</title>
  5.         <script src="http://code.jquery.com/jquery-latest.min.js" type="text/javascript"></script>
  6.         <script type="text/javascript">
  7.             function LoadPicture(num) {
  8.                 if (!num) num = 5;
  9.                 $('#rg_picture').text('');
  10.                 var id = parseInt($('#rg_num').val());
  11.                 var table = 0;
  12.                 for (i = id; i <= id + parseInt(num); i ++) {
  13.                     table ++;
  14.                     $('#rg_picture').append('<a href="http://rghost.ru/'+i+'"><img src="http://tau.rghost.ru/'+i+'/thumb.png"/></a>');
  15.                     if (table > 5) { // row
  16.                         $('#rg_picture').append('<br/>');
  17.                         table = 0;
  18.                     }
  19.                 }
  20.                 id += parseInt(num);
  21.                 $('#rg_num').val(id);
  22.             }
  23.         </script>
  24.     </head>
  25.     <body>
  26.         ID <input id="rg_num" value="52452582"/><br/>
  27.         <button onclick="LoadPicture(5)">Показать 5</button>
  28.         <button onclick="LoadPicture(10)">Показать 10</button>
  29.         <button onclick="LoadPicture(25)">Показать 25</button>
  30.         <button onclick="LoadPicture(100)">Показать 100</button>
  31.         <button onclick="LoadPicture(500)">Показать 500</button>
  32.         <button onclick="LoadPicture(500)">Показать 1000</button>
  33.         <hr>
  34.         <div id="rg_picture"></div>
  35.         <script type="text/javascript">
  36.             LoadPicture();
  37.         </script>
  38.         <button onclick="javascript:{window.scrollTo(0,0)}">Бамп</button>
  39.     </body>
  40. </html>
Advertisement
Add Comment
Please, Sign In to add comment