I have a iframe and there is a javascript function in it. Basically开发者_如何学Go, I want to create an anchor tag to call the function and activate it in my iframe. Do you have any idea?
<p><a href="javascript:document.body.contentEditable='true'; document.designMode='on'; void 0" target="test">Edit Google</a></p>
<iframe name="test" src="http://www.google.com"></iframe>
It is not working. Any idea?
I was searching around trying to find an answer, but I think it's easier if I just give you a link to this site that I found: http://www.dyn-web.com/tutorials/iframes/refs.php
You can't do that for obvious security reasons: one website can't and should never be able to control anything in other website.
If both pages are in the same domain there is a way, but different domains? Nope.
Instead of showing iframe you can try loading the external site with AJAX, parse the result and show your own form.
精彩评论