View difference between Paste ID: dPp864Ly and ub70q3fb
SHOW: | | - or go back to the newest paste.
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-
				for (i = id; i <= id + parseInt(num); i ++) $('#rg_picture').append('<img src="http://tau.rghost.ru/'+i+'/thumb.png"/><br/>');
11+
				var table = 0;
12
				for (i = id; i <= id + parseInt(num); i ++) {
13
					table ++;
14
					$('#rg_picture').append('<img src="http://tau.rghost.ru/'+i+'/thumb.png"/>');
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="52448330"/><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
		<hr>
33
		<div id="rg_picture"></div>
34
		<script type="text/javascript">
35
			LoadPicture();
36
		</script>
37
		<button onclick="javascript:{window.scrollTo(0,0)}">Бамп</button>
38
	</body>
39
</html>