期中考重點
write寫入檔案模式mode w=write會覆蓋原有檔案, a=append接續原來檔案, x=create創立新檔案, x與w有何不同?
write寫入檔案,預設不換行,換行'\n'
print呈現在螢幕,預設換行,不換行end=''。
write寫入用到英文以外的字元(一,a,b)encoding='utf8'
開一個資料資料夾放三個檔案html, css, js,用html文件document
在html檔案指定css與js檔案,參考w3schools...都有寫
vs code的html檔案
王致美輸入參數
重點
alert內建函數,自訂函數abc
王致美輸入參數
輸入k
輸入m
輸入n
執行自訂函數
重點
alert內建函數,自訂函數abc
王致美輸出結果
vs code的css檔案
h1{background-color: purple; color: white; border: 10px solid red; text-align:center; padding: 5px}
ul{background-color: green; color: white; font-size: 2em;line-height:1.5}
input{font-size:24px;background-color:rgb(210, 250, 215);}
vs code的javascript檔案
function abc(){
k = document.getElementById('k').value;
m = document.getElementById('m').value;
n = document.getElementById('n').value;
out = k;
document.getElementById('out').innerHTML=out;
}
留言
張貼留言