it uses the cols parameter for a frameset<FRAMESET name="fstMain" cols="216,*" border="1" frameborder="1" FRAMESPACING="6" TOPMARGIN="0" LEFTMARGIN="0" MARGINHEIGHT="0" MARGINWIDTH="0">
function hidetoc()
{
strColumns_Current = top.mainframeset.cols
top.mainframeset.cols = "1,*"; //把左边一桢的宽度减为1
top.contentbar.document.all("showtoc").style.display = "block";
}function showtoc()
{
top.mainframeset.cols = strColumns_Current; //恢复原样
top.contentbar.document.all("showtoc").style.display = "none";
}
function hidetoc()
{
strColumns_Current = top.mainframeset.cols
top.mainframeset.cols = "1,*"; //把左边一桢的宽度减为1
top.contentbar.document.all("showtoc").style.display = "block";
}function showtoc()
{
top.mainframeset.cols = strColumns_Current; //恢复原样
top.contentbar.document.all("showtoc").style.display = "none";
}
but it didn't work.
出错原因:top.mainframeset不是对象
请问用top.mainframeset.cols可以引用到<frameset>里的cols吗?
http://msdn.microsoft.com/library/shared/deeptree/htc/deeptree.htcwindow.top.leftframe = top.frames.fraLeftFrame;
window.top.rightframe = top.frames.fraRightFrame;
window.top.mainframeset = top.document.all.fstMain;