-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.htm
35 lines (30 loc) · 804 Bytes
/
index.htm
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
<html>
<head>
<meta charset="UTF-8">
<script src="https://code.jquery.com/jquery-1.9.1.min.js"></script>
</head>
<body>
<style>
iframe {
border: 1px dashed red;
border-radius: 8px;
height: 400px;
}
</style>
iFrame:<br/>
<iframe id="iframe" src="iframe.htm"></iframe>
<div>
<p>Wartość przekazana z iframe: <span id="value">???</span></p>
</div>
<script>
$(document).ready(function () {
$('#iframe').load(function () {
var btn = $('#iframe').contents().find('#btnIframe');
$(btn).on('click', function () {
$('#value').html('No i wziął i przekazał!');
});
});
});
</script>
</body>
</html>