框架-iframe.html
1.17 KB
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
40
41
42
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="http://static.yohobuy.com/admin/css/style.css" rel="stylesheet" type="text/css" media="all" />
<script type="text/javascript" src="http://static.yohobuy.com/admin/js/jquery.min.js"></script>
<link type="text/css" href="http://static.yohobuy.com/admin/js/jqueryui/themes/ui-lightness/jquery-ui-1.8.7.custom.css" rel="stylesheet" />
<script type="text/javascript" src="http://static.yohobuy.com/admin/js/jqueryui/ui/jquery-ui-1.8.7.custom.js"></script>
<title>YOHO有货后台管理</title>
</head>
<body style="background:#FFF">
子页面iframe内容
<script type="text/javascript">
var _parentWin = window.parent ;
_parentWin.form1.username.value = "这是子页面为父级赋值";
</script>
<div id="ppp"></div>
<br />
<br />
<input name="" type="button" value="调用父级方法" onclick="parent.test()" />
<br />
<br />
<script type="text/javascript">
function test2(){
alert("子级方法");
}
</script>
</body>
</html>