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

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定

setTimeout("ChangeH('" + id + "',1)", 10)里面的1寫成count為什么不行?

<!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>

? ? <title></title>

? ? <style type="text/css">

? ? ? ? .top-nav

? ? ? ? {

? ? ? ? ? ? font-size: 14px;

? ? ? ? ? ? font-weight: bold;

? ? ? ? ? ? list-style: none;

? ? ? ? }

? ? ? ? .top-nav li

? ? ? ? {

? ? ? ? ? ? float: left;

? ? ? ? ? ? margin-right: 1px;

? ? ? ? }

? ? ? ? .top-nav li a

? ? ? ? {

? ? ? ? ? ? line-height: 34px;

? ? ? ? ? ? text-decoration: none;

? ? ? ? ? ? background: #3f240e;

? ? ? ? ? ? color: #fff;

? ? ? ? ? ? display: block;

? ? ? ? ? ? width: 80px;

? ? ? ? ? ? text-align: center;

? ? ? ? } ? ? ? ?

? ? ? ? .top-nav ul

? ? ? ? {

? ? ? ? ? ? list-style: none;

? ? ? ? ? ? display: none;

? ? ? ? ? ? padding: 0;

? ? ? ? ? ? position: absolute;

? ? ? ? ? ? height: 0;

? ? ? ? ? ? overflow: hidden;

? ? ? ? }

? ? ? ??

? ? ? ? .top-nav li a:hover

? ? ? ? {

? ? ? ? ? ? background: url(http://img1.sycdn.imooc.com//5461b50d0001e28000010034.jpg) 0 0 repeat-x;

? ? ? ? }

? ? ? ? .note

? ? ? ? {

? ? ? ? ? ? color: #3f240e;

? ? ? ? ? ? display: block;

? ? ? ? ? ? background: url(http://img1.sycdn.imooc.com//5461b50d0001e28000010034.jpg) 0 0 repeat-x;

? ? ? ? }

? ? ? ? .corner

? ? ? ? {

? ? ? ? ? ? display: block;

? ? ? ? ? ? height: 11px;

? ? ? ? ? ? background: url(http://img1.sycdn.imooc.com//5461b5620001410d00170011.jpg) 31px 0 no-repeat;

? ? ? ? }

? ? </style>

? ? <script type="text/javascript">

? ? ? ? window.onload = function () {

? ? ? ??

? ? ? ?//鼠標(biāo)經(jīng)過(guò)時(shí)的效果

? ? ? ?var Lis=document.getElementsByTagName("li");

? ? ? ?for(var i=0;i<Lis.length;i++){

? ? ? ? ? ? Lis[i].onmouseover = function () {

? ? ? ? ? ? ? ? ? ? var u = this.getElementsByTagName("ul")[0];

? ? ? ? ? ? ? ? ? ? if (u != undefined) {

? ? ? ? ? ? ? ? ? ? ? ? u.style.display="block";

? ? ? ? ? ? ? ? ? ? ? ? ChangeH(u.id,1);

? ? ? ? ? ? ? ? ? ? }

? ? ? ? ? ? ? ? }; ? ?

? ? ? ? ? ? ? ??

? ? ? ? ? ? Lis[i].onmouseleave = function () {

? ? ? ? ? ? ? ? var u = this.getElementsByTagName("ul")[0];

? ? ? ? ? ? ? ? if (u != undefined) {

? ? ? ? ? ? ? ? ? ? ChangeH(u.id,-1);

? ? ? ? ? ? ? ? ? ? }

? ? ? ? ? ? ? ? };

? ? ? ? ? ? }

? ? ? ? };


? ? ? ? function ChangeH(id, count) {

? ? // 根據(jù)ID找到ulList,同時(shí)得到其高度

? ? ? ? ? ? var ulList = document.getElementById(id);

? ? ? ? ? ? var h = ulList.offsetHeight;

? ? ? ? ? ? h += count;

? ? ? ? ? ? if (count > 0) {

? ? ? ? ? ? ? ? if (h <= 42) {

// 將高度賦值給ulList,同時(shí),不斷調(diào)用本函數(shù)

? ? ? ? ? ? ? ? ? ? ulList.style.height = h + "px";

? ? ? ? ? ? ? ? ? ? setTimeout("ChangeH('" + id + "',1)", 10);

? ? ? ? ? ? ? ? }

? ? ? ? ? ? ? ? else {

? ? ? ? ? ? ? ? ? ? return;

? ? ? ? ? ? ? ? }

? ? ? ? ? ? }

? ? ? ? ? ? else {

? ? ? ? ? ? ? ? if (h > 0) {

// 將高度賦值給ulList,同時(shí),不斷調(diào)用本函數(shù)

? ? ? ? ? ? ? ? ? ? ulList.style.height = h + "px";

? ? ? ? ? ? ? ? ? ? setTimeout("ChangeH('" + id + "',-1)", 10);

? ? ? ? ? ? ? ? }

? ? ? ? ? ? ? ? else {

? ? ? ? ? ? ? ? ? ? ulList.style.display = "none";

? ? ? ? ? ? ? ? ? ? return;

? ? ? ? ? ? ? ? }

? ? ? ? ? ? }

? ? ? ? }

? ? </script>

</head>

<body>

? ? <ul class="top-nav">

? ? ? ? <li><a href="#"><span class="note">慕課網(wǎng)</span></a> </li>

? ? ? ? <li><a href="#">課程大廳</a> </li>

? ? ? ? <li><a href="#">學(xué)習(xí)中心</a>

? ? ? ? ? ? <ul id="mnuUL">

? ? ? ? ? ? ? ? <span class="corner"></span>

? ? ? ? ? ? ? ? <li><a href="#">前端課程 </a></li>

? ? ? ? ? ? ? ? <li><a href="#">手機(jī)開發(fā)</a> </li>

? ? ? ? ? ? ? ? <li><a href="#">后臺(tái)編程</a></li>

? ? ? ? ? ? </ul>

? ? ? ? </li>

? ? ? ? <li><a href="#">關(guān)于我們</a></li>

? ? </ul>

</body>

</html>


正在回答

1 回答

count 是參數(shù)值,所以你想使用count的時(shí)候,可以寫成

setTimeout("ChangeH('" + id + "',"+count+")", 10);


0 回復(fù) 有任何疑惑可以回復(fù)我~
#1

IDfanyong 提問(wèn)者

非常感謝!
2015-10-27 回復(fù) 有任何疑惑可以回復(fù)我~

舉報(bào)

0/150
提交
取消
形形色色的下拉菜單
  • 參與學(xué)習(xí)       106933    人
  • 解答問(wèn)題       563    個(gè)

本教程從易到難,循循漸進(jìn),運(yùn)用不同技術(shù)實(shí)現(xiàn)動(dòng)態(tài)下拉菜單

進(jìn)入課程

setTimeout("ChangeH('" + id + "',1)", 10)里面的1寫成count為什么不行?

我要回答 關(guān)注問(wèn)題
微信客服

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

幫助反饋 APP下載

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

公眾號(hào)

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