1 Star 0 Fork 0

yzishan / webs

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
b.html 1.35 KB
一键复制 编辑 原始数据 按行查看 历史
yangzishan 提交于 2024-01-09 17:56 . 啊大大
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta content="initial-scale=1.0,user-scalable=no,maximum-scale=1,width=device-width" name="viewport" />
<meta content="yes" name="apple-mobile-web-app-capable" />
<meta content="black" name="apple-mobile-web-app-status-bar-style" />
<meta content="telephone=no" name="format-detection" />
<title>iframe父</title>
</head>
<body>
<div id="vm">
<p>b.html子级</p>
<p>要展示的内容</p>
<p id="son"></p>
<button id="sonBtn">test</button>
<button id="diao">fuc</button>
<div></div>
<button id="get">获取数据</button>
<div class="get">get</div>
</div>
<script type="text/javascript" src="jquery.js"></script>
<script>
var sonName = 'b.html';
var sonDoc = window.parent.docId;
$('#son').text(sonDoc);
var sonVal = window.parent.$("#fuInput").val();
console.log(sonVal);
$('#sonBtn').click(function(){
$('#son').text(window.parent.docIdtwo);
});
$('#diao').click(function(){
//window.parent.fu('自己参数');
window.parent.postMessage("hello","*");
})
var url = window.parent.$('#iframeb').attr('src');
console.log(url)
function sonMethord(x){
console.log(x+sonName)
}
$('#get').click(function(){
window.parent.getHistoryData(1,10,'方药搜索字',function(res){
        console.log(res)
//拿到res要执行的操作
    });
})
</script>
</body>
</html>
1
https://gitee.com/yzishan/webs.git
git@gitee.com:yzishan/webs.git
yzishan
webs
webs
master

搜索帮助