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

為了賬號安全,請及時綁定郵箱和手機立即綁定

document.write("hello"); document.getElementById("p1").style.color="blue";

document.write("hello");

? document.getElementById("p1").style.color="blue";

?document.write ("hello")什么意思,?

? document.getElementById 什么意思呀 ?不懂 這怎么記?求解!


正在回答

5 回答

document.write("hello");//輸出hello//

?document.getElementById("p1").style.color="blue";//將id為p1的元素的文本顏色設(shè)置為藍色//

document.getElementById();是DOM中元素獲取方法中的一種,通過元素的id名來獲取元素

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

慕慕0677951 提問者

非常感謝!
2017-04-13 回復(fù) 有任何疑惑可以回復(fù)我~

document.write("");

是指輸出雙引號內(nèi)的字符串

document.getElementById("p1").style.color="blue";

選取背景為p1的樣式是指規(guī)定顏色為藍色

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

document.write("hello"); //輸出hello

document.getElementById("p1") ,是指獲取document對象

document.getElementById("p1").style.color="blue"; ,是指將所獲取的document對象的樣式顏色改為藍色

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

?document.write ("hello")是指在網(wǎng)頁上打印出"hello"這個詞;

?document.getElementById("p1").style.color="blue" 是指操作id為"p1"的樣式,這里把id為"p1"的顏色樣式修改成了藍色

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

JavaScript中輸出hello

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

舉報

0/150
提交
取消

document.write("hello"); document.getElementById("p1").style.color="blue";

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

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

幫助反饋 APP下載

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

公眾號

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