第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問題,去搜搜看,總會(huì)有你想問的

求幫忙!為什么我在subh函數(shù)里即使加了style.display="none",卻還是沒有隱藏呢?

求幫忙!為什么我在subh函數(shù)里即使加了style.display="none",卻還是沒有隱藏呢?

零基礎(chǔ)1 2016-05-31 10:47:43
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head>? ? <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />? ? <title>自動(dòng)展開</title>? ? <style type="text/css">? ? ? ? ?body? ? ? ? {? ? ? ? ? ? margin: 0 auto;? ? ? ? ? ? padding: 0;? ? ? ? }? ? ? ? a:focus? ? ? ? {? ? ? ? ? ? outline: none;? ? ? ? }? ? ? ??? ? ? ? #pn? ? ? ? {? ? ? ? ? ? background: #e8e8e8;? ? ? ? ? ? height: auto;? ? ? ? ? ? width: 960px;? ? ? ? ? ? display:block;? ? ? ? ? ? margin: 0 auto;? ? ? ? ? ? padding: 5px;? ? ? ? ? ? text-align: center;? ? ? ? ? ??? ? ? ? ?}? ? ? ? .slide? ? ? ? {? ? ? ? ? ? padding: 10px;? ? ? ? ? ? width: 950px;? ? ? ? ? ? margin: 0 auto;? ? ? ? ? ? background: gray;? ? ? ? ? ? text-align: center;? ? ? ? ? ? height: 40px;? ? ? ? ? ? line-height: 40px;? ? ? ? ? ? color: #fff;? ? ? ? }? ? </style>? ? <script type="text/javascript">? ? ? ?? ? ? ? var h=0;? ? ? ? //增加高度函數(shù)addH()? ? ? ? ? ??? ? ? ? function addh() { ?? ? ? ? ? ? ??? ? ? ? ? if(h<300){? ? ? ? ? ? ? ?h=h+5;? ? ? ? ? ? ? ?document.getElementById('pn').style.height=h+"px";? ? ? ? ? ? ?}else{? ? ? ? ? ? ? ?return;? ? ? ? ? ?}? ? ? ? setTimeout("addh()",30);? ? ? ? }? ? ? ??? ? ? ?//網(wǎng)頁(yè)加載完畢時(shí),調(diào)用增加高度函數(shù)addH(),等待5秒鐘后調(diào)用減少高度函數(shù)subh()。? ? ? ? ?window.onload=function(){? ? ? ? ? ? ?? ? ? ? ? ?addh();? ? ? ? ? setTimeout("subh()",5000);?? ? ? ?}? ? ? ? ??? ? ? ? // 減少高度函數(shù)subH()? ??? ? ? ? function subh() {? ? ? ? ? ??? ? ? ? ? ? ??? ? ? ? ? ?if(h>0){? ? ? ? ? ? ? ?h=h-5;? ? ? ? ? ? ? ?document.getElementById('pn').style.height=h+"px";? ? ? ? ? ? ? ?}else{? ? ? ? ? ? ? ?return;? ? ? ? ? ? ? ? document.getElementById('pn').style.display="none";? ? ? ? ? ? ? ?? ? ? ? ? ?}? ? ? ? ? ?setTimeout("subh()",30); ? ? ? ? ? ??? ? ? ? }?? ? </script></head><body>? ? <div id="pn">? ? ? ? <h1>? ? ? ? ? ? 歡迎來到慕課網(wǎng)</h1>? ? ? ? <h2>? ? ? ? ? ? 大幅廣告</h2>? ? </div>? ? <p class="slide">? ? ? ? 慕課網(wǎng)歡迎你</p></body></html>
查看完整描述

3 回答

?
艾西西

TA貢獻(xiàn)1條經(jīng)驗(yàn) 獲得超1個(gè)贊

樓上說的都對(duì)

查看完整回答
1 反對(duì) 回復(fù) 2016-05-31
  • 3 回答
  • 0 關(guān)注
  • 1285 瀏覽
慕課專欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)