append element in head of an iframe using jquery

后端 未结 4 1746
刺人心
刺人心 2021-01-17 23:21

i want to append a style sheet(css) link to the head of an iframe using jquery . i tried with the following code but not working.

$(\'#tabsFrame\').contents(         


        
4条回答
  •  余生分开走
    2021-01-18 00:00

    I believe you can't manipulate the content of an iframe because of security. Having you be able to do such a thing would make cross-site-scripting too easy.

    The iframe is totally seperate from the DOM of your page.

    Also, java and javascript are two completely different things!

    Follow the Link to see the difference here

提交回复
热议问题