首先:每个页面都是一个window对象框架:window中包含了window
window是本window,就是当前脚本所在的windowtop最上层的windowparent包含自己的windowobj.frames['id'],obj所代表的window对象包含的id为'id'的window
反正按照你的情况绕一下就可以了
window是本window,就是当前脚本所在的windowtop最上层的windowparent包含自己的windowobj.frames['id'],obj所代表的window对象包含的id为'id'的window
反正按照你的情况绕一下就可以了
top.frames['newsFrame'].readdetailwindow('45654');
提示对象不支持此属性或方法
这是为什么呀
<iframe src="B.htm" style="width:100%;height:100%" id="main"></iframe>
<script>
function f1()
{
document.frames("main").frames("main1").test();
}
</script>
<input type=button onclick=f1()>
B.htm
<iframe src="c.htm" style="width:100%;height:100%" id="main1"></iframe>C.htm
<script>
function test()
{
alert("a");
}
</script>
<frame src="playervideo.html" name="mainFrame" scrolling="No" noresize>
<frame src="main.jsp" name="bottomFrame" scrolling="auto">
</frameset>
在main.jsp中包含iframe 我在这个iframe中调用playervideo.html中的javascript函数
我这样调用document.bottomFrame.playvideo()
提示不是对象或对象为空
<frame src="playervideo.html" name="mainFrame" scrolling="No" noresize>
<frame src="main.html" name="bottomFrame" scrolling="auto">
</frameset>
///////////////playervideo.html
<script>
function test()
{
alert('playervideo.html');
}</script>
playervideo.html
<input type=button id=Text1 onclick=f1()>
/////////////mail.html
<script>
function f1()
{
}
</script>
<input type=button onclick=f1()>
main.html
<iframe src="123.htm" style="width:100%;height:100%" id="main1"></iframe>
//////////123.htm
<script>
function f2()
{
parent.parent.frames["mainFrame"].test();
}
</script>
<input type="button" onclick=f2() value="ooooooooo">