父级页面地址:http://localhost:63342/parent.html
代码:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<fieldset>
<legend>父页面通过 iframe Name 调用子页面的函数或者获取子页面元素的内容</legend>
<dl>
<dt>
<input type="button" value="通过ifrme Name 调用子页面的脚本" onclick="aaa();" />
</dt>
<dt>
<div style="width: 100%; height: 250px;">
<iframe name="childPage1" src="http://localhost:8201/#/security/index" frameborder="0" scrolling="no" width="100%"
height="550"></iframe>
</div>
</dt>
</dl>
</fieldset>
</body>
</html>
<script>
function aaa(){
}
//fun