document.write("hello"); document.getElementById("p1").style.color="blue";
document.write("hello");
? document.getElementById("p1").style.color="blue";
?document.write ("hello")什么意思,?
? document.getElementById 什么意思呀 ?不懂 這怎么記?求解!
document.write("hello");
? document.getElementById("p1").style.color="blue";
?document.write ("hello")什么意思,?
? document.getElementById 什么意思呀 ?不懂 這怎么記?求解!
2017-04-03
舉報
2017-04-03
document.write("hello");//輸出hello//
?document.getElementById("p1").style.color="blue";//將id為p1的元素的文本顏色設(shè)置為藍色//
document.getElementById();是DOM中元素獲取方法中的一種,通過元素的id名來獲取元素
2017-04-03
document.write("");
是指輸出雙引號內(nèi)的字符串
document.getElementById("p1").style.color="blue";
選取背景為p1的樣式是指規(guī)定顏色為藍色
2017-04-03
document.write("hello"); //輸出hello
document.getElementById("p1") ,是指獲取document對象
document.getElementById("p1").style.color="blue"; ,是指將所獲取的document對象的樣式顏色改為藍色
2017-04-03
?document.write ("hello")是指在網(wǎng)頁上打印出"hello"這個詞;
?document.getElementById("p1").style.color="blue" 是指操作id為"p1"的樣式,這里把id為"p1"的顏色樣式修改成了藍色
2017-04-03
JavaScript中輸出hello