|
Posted by BootNic on 08/10/07 13:56
cx <cxcxcxcx@gmail.com> wrote:
news:1186749066.388605.324550@i13g2000prf.googlegroups.com:
> I want to acess a variable in the iframe, the following code runs well
> in Firefox and IE, but fails in Opera. Can I modify the code to meet
> opera's standard?
>
> a.htm:
> <iframe id=q src="b.htm"></iframe>
> <script>
> var i;
> var l=document.getElementById('q');
> alert(l.kkk);
> </script>
>
> b.htm:
> <script>
> var kkk=1;
> </script>
<script type="text/javascript">
var l=document.getElementById('q');
l.onload=function(){alert(l.contentWindow.kkk)}
</script>
--
BootNic Friday, August 10, 2007 9:56 AM
I had a monumental idea this morning, but I didn't like it.
*Samuel Goldwyn*
Navigation:
[Reply to this message]
|