码迷,mamicode.com
首页 > 其他好文 > 详细

layer 弹框 很好用 页面交互不好弄!!!父子弹框的交互!

时间:2016-07-12 15:25:43      阅读:171      评论:0      收藏:0      [点我收藏+]

标签:

@赵立成  下面2个文件你再试试,记得引入Jquery

   ①. main.html (子页面)

<html>
<head>
<script type="text/javascript" src="jquery-1.7.1.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
    alert(100);
    var a1 = $(‘#a1‘, parent.document).val();
    var a2 = $(‘#a2‘, parent.document).val();
    alert(a1+"  "+a2);
});
</script>
</head>
<body>
</body>
</html>
 
<html>
<body>
<input type="hidden" id ="a1" value="123"/>
<input type="text" id ="a2" value="456"/>
<iframe src="main.html">
</body>
</html>
 
技术分享技术分享技术分享

layer 弹框 很好用 页面交互不好弄!!!父子弹框的交互!

标签:

原文地址:http://www.cnblogs.com/520kwl/p/5663566.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!