劉任昌HTML,CSS,JavaScript將執行結果放置網頁取代檔案
期中考重點
- 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檔案
<link rel='stylesheet' href="abc.css">劉任昌輸入參數
輸入k
輸入m
輸入n
重點
alert內建函數,自訂函數abc劉任昌輸出結果
<script src="abs.js"></script>
<h1>劉任昌輸入參數</h1>
輸入k<input type="number" value="1" id="k"></input><br>
輸入m<input type="number" value="1" id="m"></input><br>
輸入n<input type="number" value="1" id="n"></input><br>
<button onclick="abc()">執行自訂函數</button>
<h1>重點</h1>
alert內建函數,自訂函數abc
<h1>劉任昌輸出結果</h1>
<div id="out"></div>
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; }
https://wilson11122.blogspot.com/2024/04/htmlcssjava-script.html
回覆刪除https://addison030.blogspot.com/2024/04/htmlcssjavascript.html
回覆刪除https://kk0725.blogspot.com/2024/04/htmlcssjavascript.html
回覆刪除https://hui026.blogspot.com/2024/04/htmlcssjavascript.html
回覆刪除https://oscarliu1688.blogspot.com/2024/04/htmlcssjavascript.html
回覆刪除https://whitexd.blogspot.com/2024/04/html-css-javascript.html
回覆刪除https://njcjww.blogspot.com/2024/04/htmlcssjavescript.html
回覆刪除https://keiime.blogspot.com/2024/04/htmlcssjavascript.html
回覆刪除https://ctz642895.blogspot.com/2024/04/html-css-javascript.html
回覆刪除https://htmlcssjavascriptjavapython.blogspot.com/2024/04/h1background-color-purple-color-white.html
回覆刪除https://tustning.blogspot.com/2024/04/htmlcssjavascript.html
回覆刪除https://asd0908449304.blogspot.com/2024/04/htmlcssjavaspcript.html
回覆刪除https://grace8166.blogspot.com/2024/04/htmlcssjavascript.html
回覆刪除https://xi715.blogspot.com/2024/04/htmlcssjavascript.html
回覆刪除