課程
/前端開發(fā)
/JavaScript
/JavaScript入門篇
document.getElementId("p1").style. style后面如果接其他的樣式?,怎么寫?
2016-08-31
源自:JavaScript入門篇 1-1
正在回答
?var p1 = document.getElementById("p1");
? ? ? ? ? p1.style.width="200px";
????????? p1.style.height="100px";
????????? p1.style.display="none";
MrSample3913337 提問者
舉報
JavaScript做為一名Web工程師的必備技術,本教程讓您快速入門
2 回答style中設置class樣式
2 回答為什么設置了p1 style color = blue后沒有變化
1 回答我在p1里面添加了樣式,那我要怎么設置一個按鈕在p2里面取消設置的樣式
1 回答最后的取消設置不會把<style></style>里面的樣式設置也取消掉嗎?
2 回答如果設置其他樣式怎么寫啊?試了幾下沒出效果
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號-11 京公網(wǎng)安備11010802030151號
購課補貼聯(lián)系客服咨詢優(yōu)惠詳情
慕課網(wǎng)APP您的移動學習伙伴
掃描二維碼關注慕課網(wǎng)微信公眾號
2016-08-31
?var p1 = document.getElementById("p1");
? ? ? ? ? p1.style.width="200px";
????????? p1.style.height="100px";
????????? p1.style.display="none";