-
Notifications
You must be signed in to change notification settings - Fork 0
/
pagina02(julio).html
39 lines (27 loc) · 967 Bytes
/
pagina02(julio).html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<!doctype html>
<html lang="pt-br">
<head>
<meta charset="utf-8">
</head>
<body>
<section id="mainSection" style="max-width:750px;height:200px;background:#f1f1f1;">
</section>
<p>ACIMA ENTRARIA AS IMAGENS SELECIONADAS NA PÁGINA ANTERIOR</p>
<script src="jquery-3.3.1.min.js"></script>
<script>
$(document).ready(function () {
var imagesFromUrl = getParameterByName('img');
var images = imagesFromUrl.split(',');
for (var i = 0; i < images.length; i++) {
$('#mainSection').prepend('<img style="max-width:180px" id="theImg' + i + '" src="' + images[i] + '" />');
}
});
function getParameterByName(name) {
name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"),
results = regex.exec(location.search);
return results === null ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));
}
</script>
</body>
</html>