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

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

如果要實(shí)現(xiàn)選項(xiàng)卡自動(dòng)切換呢,應(yīng)該添加什么代碼?

是否可以設(shè)置間隔時(shí)間,如3秒,選項(xiàng)卡自動(dòng)切換。

函數(shù)應(yīng)該如何改動(dòng)?

正在回答

1 回答

function f1(){
??????? //只是為了改變點(diǎn)擊后的樣式,重復(fù)代碼很多,造成重復(fù)勞動(dòng),后期可調(diào)整成循環(huán)
??????? document.getElementById("first").style.display="block";
??????? document.getElementById("second").style.display="none";
??????? document.getElementById("third").style.display="none";
??????? document.getElementById("tag1").style.borderTopColor="red";
??????? document.getElementById("tag1").style.borderTopWidth="2px";
??????? document.getElementById("tag1").style.borderBottomWidth="2px";

??????? document.getElementById("tag2").style.borderTopColor="blue";
??????? document.getElementById("tag2").style.borderTopWidth="1px";
??????? document.getElementById("tag2").style.borderBottomWidth="1px";

??????? document.getElementById("tag3").style.borderTopColor="blue";
??????? document.getElementById("tag3").style.borderTopWidth="1px";
??????? document.getElementById("tag3").style.borderBottomWidth="1px";
??? }
??? function f2(){
??????? document.getElementById("first").style.display="none";
??????? document.getElementById("second").style.display="block";
??????? document.getElementById("third").style.display="none";
??????? document.getElementById("tag1").style.borderTopColor="blue";
??????? document.getElementById("tag1").style.borderTopWidth="1px";
??????? document.getElementById("tag1").style.borderBottomWidth="1px";


??????? document.getElementById("tag2").style.borderTopColor="red";
??????? document.getElementById("tag2").style.borderTopWidth="2px";
??????? document.getElementById("tag2").style.borderBottomWidth="2px";

??????? document.getElementById("tag3").style.borderTopColor="blue";
??????? document.getElementById("tag3").style.borderTopWidth="1px";
??????? document.getElementById("tag3").style.borderBottomWidth="1px";

??? }
??? function f3(){
??????? document.getElementById("first").style.display="none";
??????? document.getElementById("second").style.display="none";
??????? document.getElementById("third").style.display="block";
??????? document.getElementById("tag1").style.borderTopColor="blue";
??????? document.getElementById("tag1").style.borderTopWidth="1px";
??????? document.getElementById("tag1").style.borderBottomWidth="1px";

??????? document.getElementById("tag2").style.borderTopColor="blue";
??????? document.getElementById("tag2").style.borderTopWidth="1px";
??????? document.getElementById("tag2").style.borderBottomWidth="1px";

??????? document.getElementById("tag3").style.borderTopColor="red";
??????? document.getElementById("tag3").style.borderTopWidth="2px";
??????? document.getElementById("tag3").style.borderBottomWidth="2px";
??? }


這個(gè)比較通俗,你可以換成循環(huán),代碼就比較簡單

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

舉報(bào)

0/150
提交
取消

如果要實(shí)現(xiàn)選項(xiàng)卡自動(dòng)切換呢,應(yīng)該添加什么代碼?

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

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

幫助反饋 APP下載

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

公眾號(hào)

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