如何在父页面内触发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').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();
});
});

浙公网安备 33010602011771号