好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

iframeset嵌套的问题:一层iframeset时可以展开与关闭,增加一层就不行了_html/c

先上码:
    	 		 			                                                          	                          		                     					        		          			  	    


怎么样才能点击middleFrame对leftFrame进行显示与隐藏?

本来只有一个iframeset的时候下面这个JS是可以的,加了colsIndexSon 后就没效果了
function isShowNav(){alert(window.parent.colsIndex.cols);	if(window.parent.colsIndex.cols == "250,11,*"){		window.parent.colsIndex.cols = "0,11,*";	}else{		window.parent.colsIndex.cols = "250,11,*";	}} 


回复讨论(解决方案)

增加一层,就要增加一个parent
如window.parent.parent之类的

就你这个结构从middleFrame中操作colsIndex frameset没有问题,我这里测试过了,不过非ie浏览器无法使用,因为不能那样获取colsIndex

    function isShowNav() {        var colsIndex = parent.document.getElementById('colsIndex');        alert(colsIndex.cols);        if (colsIndex.cols == "250,11,*") {            colsIndex.cols = "0,11,*";        } else {            colsIndex.cols = "250,11,*";        }    } 

查看更多关于iframeset嵌套的问题:一层iframeset时可以展开与关闭,增加一层就不行了_html/c的详细内容...

  阅读:32次