设定的时间后隐藏框架?

时间:2010-12-15 23:27:08

标签: javascript jquery html css frameset

我有一个由2帧(不是iframe)组成的页面。

如何实现:在x秒后向上收缩,顶部框架会消失(或看起来消失)?当它消失时,我希望第二帧向上移动,这样就没有顶栏了。

2 个答案:

答案 0 :(得分:2)

你可以使用jQuery来做这些事情

function hideFrame()
{
    $('#framename').slideUp(1000);
}

然后您可以使用超时功能来调用它:

setTimeout('hideFrame()', 5000); // Change 5000 to whatever you like in milliseconds...

请记住将'#framename'更改为您所调用的任何内容,例如:

<div id="framename">blah blah</div>

希望这有帮助。

(刚注意到你把'不iframes'......)

答案 1 :(得分:0)

我认为您需要使用setTimeout().slideDown()slideUp()