获得IFrame中的对象

代码如下:

View Code
1 例如:
2 Iframe连接到treeViewTest.aspx页面
3 <Iframe src="treeViewTest.aspx" name="treeframe" width="150px" height="260px" scrolling="no" frameborder="0"></iframe>
4 获得treeViewTest.aspx页面的对象:
5 document.frames["iframe的name"].document.getElementById("iFrame中对象id")

 

posted @ 2012-03-29 16:47  zhangchun  阅读(345)  评论(0)    收藏  举报