框架-iframe.html 1.17 KB
<!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>