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

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

js沒有效果,哪里錯(cuò)了?

<!DOCTYPE?html>
<html?xmlns="http://www.w3.org/1999/xhtml">
????<head>
????????<title>hover()方法切換事件</title>
???????
????????<style>
????????????*{padding:0px;margin:0px;
???????????????list-style:none;font-size:17px;}
???????????????#wrap{width:300px;border:1px?solid?#eee;margin:0?auto;overflow:hidden}
???????????????#header{height:35px;background:#eee}
???????????????#wrap?#header?ul?li{float:left;line-height:35px;height:35px;width:58px;text-align:center;list-style:none;border-left:1px?solid?#fff;
???????????????border-right:1px?solid?#fff;}
???????????????.aa{background:white;font-weight:bold;}
???????????????
???????????????#content?p{line-height:40px;text-align:center;}
???????????????.one{display:block;}?
???????????????.two{display:none;}?
???????????????
????????</style>
?????</head>
????<body>
????<div?id="wrap">
????????<div?id="header">
????????????<ul>
????????????????<li??class="aa">公告</li>
????????????????<li??class="">公告</li>
????????????????<li??class="">公告</li>
????????????????<li??class="">公告</li>
????????????????<li??class="">公告</li>
????????????</ul>
????????</div>
????????<div?id="content">
????????????<p?class="one">
????????????????1法的功能是當(dāng)鼠,
????????????????方法的功能是當(dāng)鼠,
????????????????方法的功能是當(dāng)鼠,
????????????????方法的功能是當(dāng)鼠.
????????????</p>
????????????<p?class="two">
????????????????2法的功能是當(dāng)鼠,
????????????????方法的功能是當(dāng)鼠,
????????????????方法的功能是當(dāng)鼠,
????????????????方法的功能是當(dāng)鼠.
????????????</p>
????????????<p?class="two">
???????????????3法的功能是當(dāng)鼠
????????????????方法的功能是當(dāng)鼠
????????????????方法的功能是當(dāng)鼠
????????????????方法的功能是當(dāng)鼠
????????????</p>
????????????<p?class="two"?>
???????????????4法的功能是當(dāng)鼠
???????????????方法的功能是當(dāng)鼠
????????????????方法的功能是當(dāng)鼠
????????????????方法的功能是當(dāng)鼠
????????????</p>
????????????<p?class="two">
???????????????方法的功能是當(dāng)鼠
???????????????方法的功能是當(dāng)鼠
????????????????方法的功能是當(dāng)鼠
????????????????方法的功能是當(dāng)鼠
????????????</p>
????????</div>?
????</div>
?????????
????????<script>
???????window.onload=function(){?
???????var?l=document.getElementsByTagName("li")
???????var?u=document.getElementsByTagName("p")
??????for(i=0;i<l.length;i++){
??????????l[i].index=i;
????????l[i].onclick=function(){
????????????for(j=0;j<l.length;j++){
????????????????l[j].className="";
????????????????u[j].className="two";
?????????}
??????????this.className="aa";
??????????u[this.index].className="one"
???????????}
????}
?????????}
????????</script>
????</body>
</html>

點(diǎn)擊后內(nèi)容沒有變化,不知道哪里錯(cuò)了

正在回答

1 回答

已解決了,大家無視這個(gè)問題

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

舉報(bào)

0/150
提交
取消

js沒有效果,哪里錯(cuò)了?

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

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

幫助反饋 APP下載

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

公眾號(hào)

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