Remove iframe with javascript

前端 未结 4 797
逝去的感伤
逝去的感伤 2020-12-17 14:48

I am trying to remove iFrame tags in my documents. This is the function. But it don\'t seem to work. Here is my sample code



        
4条回答
  •  一整个雨季
    2020-12-17 15:44

    You should put the iframe inside of a div element.

    //your iframe

    Then use jQuery to remove the iframe.

    $('#kk').click(function(){
       $(this).html("");
    });
    

    This is a possible solution.

提交回复
热议问题