How to add JavaScript code into existing iFrame using jQuery?

前端 未结 8 2135
借酒劲吻你
借酒劲吻你 2020-12-13 08:13

I want to add a JavaScript snippet into an existing iFrame in the page using jQuery. I have the following code...

Code:

content = \"

        
8条回答
  •  悲哀的现实
    2020-12-13 08:33

    var script = "alert('hello world');";
    $('#iframe').contents().find('body').append($('
    
                                     
                  
提交回复
热议问题