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

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

removeClass后,為什么這樣子增加樣式不行了, $("#content").addClass("bule white");

還有,我用? $("#content").attr("bule white" , ); ? ??

attr()里面少了逗號(hào)或者改分號(hào)都不行

正在回答

5 回答

?$("#content").attr("bule white" , ); ? 這是什么鬼??

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

先看基礎(chǔ)吧,兄弟,attr設(shè)置的是style,你的style有blue和white????

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

$("#content").addClass("blue white"); 注意是 ?blue ?親測(cè)可用.

然后:?$("#content").attr("bule white" , ); ? 這是啥?

$("#content").attr('class','blue white'); ? ?將id為content的元素的 class 屬性改為 blue white


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

首先,藍(lán)色是blue。然后你查查你的style有沒有white這個(gè)類,我是blue跟green兩個(gè),然后

<div id="content"?class="blue green">我脫下了一件藍(lán)色外衣</div>

本身就有兩個(gè)class,如果你想實(shí)驗(yàn)addClass,那么先把class="blue green"去掉,然后寫上$("#content").addClass("blue green");

(如果你的類名是white,那么就寫$("#content").addClass("blue white"),如果有三個(gè)類,就寫$("#content").addClass("blue green white")咯)

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

addClass是增加一個(gè)類名,請(qǐng)確保你的類名是對(duì)的 ? 設(shè)置一個(gè)屬性用逗號(hào) ?設(shè)置多個(gè)屬性用分號(hào)

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

舉報(bào)

0/150
提交
取消
jQuery基礎(chǔ)課程
  • 參與學(xué)習(xí)       154724    人
  • 解答問題       7289    個(gè)

加入課程學(xué)習(xí),有效提高前端開發(fā)速度

進(jìn)入課程

removeClass后,為什么這樣子增加樣式不行了, $("#content").addClass("bule white");

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

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

幫助反饋 APP下載

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

公眾號(hào)

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