首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > JavaScript >

frame中父窗口取得当前子窗口的title值,这样能不能取的到?该如何处理

2012-02-17 
frame中父窗口取得当前子窗口的title值,这样能不能取的到?frame中父窗口取得当前子窗口的title值,这样能不

frame中父窗口取得当前子窗口的title值,这样能不能取的到?
frame中父窗口取得当前子窗口的title值,这样能不能取的到?

[解决办法]
test.htm
<html>
<head> <title> </title> </head>
<body>
<iframe id= 'testif ' src= 'cc.htm '> </iframe>
<br/>
<input type= 'button ' value= '获取iframe的title ' onclick= 'GetTitle() '/>
<script type= 'text/javascript '>
function GetTitle()
{
alert(testif.document.title);
}
</script>
</body>
</html>

cc.htm
<html>
<head> <title> cc.htm </title> </head>
<body>
cc.htm
</body>
</html>

热点排行