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

父页面的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').contents().find('.table_img_face').click(function(){
                var img_url = $(this).attr('src')
                $('.pop_img').children('img').attr('src',img_url)
                $('.bounced').show();
            })

猜你喜欢

转载自www.cnblogs.com/menxiaojin/p/12085068.html
今日推荐