https://www.youtube.com/watch?v=I5kj-YsmWjM Build this JS calculator in 15 minutes! 以上程式碼 許志遠學習Bro code製作計算機 + 7 8 9 - 4 5 6 * 1 2 3 / 0 . = 刪 許 志 遠 https://www.youtube.com/watch?v=I5kj-YsmWjM Build this JS calculator in 15 minutes! 心得與考試重點 LIST條列,UL UNORDERED LIST, OL ORDERED LIST,BUTTON按鈕,CLICK按下,ONCLICK事件 網頁的命令,大小寫都可以。 刪 < button onclick= "clearDisplay()">刪</button> SCRIPT區段有三個自訂函數 function appendToDisplay(input) { const display = document.getElementById("display"); display.value += input;} function clearDisplay() { const display = document.getElementById("display"); display.value = "";} function calculate() { const display = document.getElementById("display"); try{ display.value = eval(display.value); } catch(error){display.value = "Error";} } 在STYLE區段定義.MY{BACKGROUND-COLOR: PURPLE;}可以用在網頁的CLASS='MY...
google「"許志遠" and "程式設計" and "CSS"」順利找到網頁。https://yuanxuzhi.blogspot.com/2024/11/2024297306.html
回覆刪除