首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > JavaScript >

sleep 以后 div 没有显示

2012-08-31 
sleep 之后 div 没有显示HTML codehtmlhead/headbodydiv idlogin aaadivdiv idselect_n

sleep 之后 div 没有显示

HTML code
<html><head></head><body>    <div id="login" >        aaa    <div>    <div id="select_name" style="display:none">        bbb    <div>    <script>    var sleep_int = self.setInterval("login_sleep()",10000);    function login_sleep () {        document.getElementById("login").style.display = "none";        document.getElementById("select_staff_name").style.display = "block";        window.clearInterval(sleep_int);    }    </script></body></html>


select_name 这个 div 一开始是隐藏的,在经过一段时间收 吧 login 这个 div 隐藏掉,显示select_name这个,login隐藏掉了,但select_name没有显示,怎么把 select_name 显示出来呢???

[解决办法]
你的html写错了
应该是

<div id="login">
aaa
</div>
<div id="select_name" style="display: none">
bbb
</div>


注意结束标记

热点排行