謝孜妤VS CODE編輯HTML,CSS,JS俄羅斯方塊
謝孜妤模仿印度程式設計師
338影片
w3school截圖練習迴圈arrays與陣列loop
在撰寫模式貼上以上程式碼
lt=less than小於,gt=greater than
a<!DOCTYPE html><html>
<body>
<h1>JavaScript Arrays</h1>
<h1>JAVASCRIPT陣列ARRAYS由連續相關變數構成</h1>
<p id="demo"></p>
<H2>利用迴圈輸出</H2>
<p id="demo1"></p>
<script>
const color=["lightgray","#ff0000","orage","yellow:,
"daekgreen","blue","indigo","purple";
const cars = ["吃賽", "富豪", "寶馬","謝孜妤"];
document.getElementById("demo").innerHTML = cars;
tmp="";//空白的字串
for(let i=0;i<color.length;i++){
tmp +="span style:'color'"+">"color[i]+"
document.getElementById("demo").innerHTML = tmp;
</script>
</body>
</html>
1120完全做到老師的期待,妳超級優秀!
回覆刪除1120下次記得a的功能,就是避免被貼到h1中。妳完全做到老師的期待,妳超級優秀!
回覆刪除