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

如何在父页面内触发iframe的元素

时间:2019-12-23 18:30:29      阅读:76      评论:0      收藏:0      [点我收藏+]

标签:bsp   img   res   UNC   info   table   bounce   click   src   

父页面的iframe

<iframe src="{{ url_for(‘room_info.person_open_record‘, resiId =resiId) }}" style="width: 100%;" id="face_record"></iframe>

iframe页面的点击的class

<img src="{{ i.imgUrl }}" class="table_img_face"/>

js代码

$(‘#face_record‘).on(‘load‘,function(event){
                $(‘#face_record‘).contents().find(‘.table_img_face‘).on(‘click‘,function(){
                    var img_url = $(this).attr(‘src‘)
                    $(‘.pop_img‘).children(‘img‘).attr(‘src‘,img_url)
                    $(‘.bounced‘).show();
                });
            }); 

如何在父页面内触发iframe的元素

标签:bsp   img   res   UNC   info   table   bounce   click   src   

原文地址:https://www.cnblogs.com/menxiaojin/p/12085068.html

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