您好,欢迎访问一九零五行业门户网

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

先上码:

怎么样才能点击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,*; } }
其它类似信息

推荐信息