make iframe height dynamic based on content inside- JQUERY/Javascript

前端 未结 20 2244
情书的邮戳
情书的邮戳 2020-11-22 07:42

I am loading an aspx web page in an iframe. The content in the Iframe can be of more height than the iframe\'s height. The iframe should not have scroll bars.

I have

20条回答
  •  北荒
    北荒 (楼主)
    2020-11-22 08:11

    jQuery('.home_vidio_img1 img').click(function(){
        video = '';
        jQuery(this).replaceWith(video);
    });
    
    jQuery('.home_vidio_img2 img').click(function(){
        video = ;
        jQuery('.home_vidio_img1 img').replaceWith(video);
        jQuery('.home_vidio_img1 iframe').replaceWith(video);
    });
    
    jQuery('.home_vidio_img3 img').click(function(){
        video = '';
        jQuery('.home_vidio_img1 img').replaceWith(video);
        jQuery('.home_vidio_img1 iframe').replaceWith(video);
    });
    
    jQuery('.home_vidio_img4 img').click(function(){
        video = '';
        jQuery('.home_vidio_img1 img').replaceWith(video);
        jQuery('.home_vidio_img1 iframe').replaceWith(video);
    });
    

提交回复
热议问题