Can i inject javascript into iframe? -


<html>     <head>         <link rel="stylesheet" href="my.css" />     </head>     <body>         <iframe id="baidu-container" src="http://image.baidu.com/i?tn=baiduimage&ipn=r&ct=201326592&cl=2&lm=-1&st=-1&fm=result&fr=&sf=1&fmq=1374487244324_r&pv=&ic=0&nc=1&z=&se=1&showtab=0&fb=0&width=&height=&face=0&istype=2&ie=utf-8&word=giant" frameborder="0">         </iframe>         <script type="text/javascript" src="my.js"></script>     </body> </html> 

i execute script in my.js after iframe has loaded completely. shoud do? thanks.

you can use onload event on iframe:

http://www.w3schools.com/jsref/event_frame_onload.asp


Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

html - Unable to style the color of bullets in a list -

c# - must be a non-abstract type with a public parameterless constructor in redis -