張岳宸學習Bro Code製作計算機

張岳宸學習Bro code製作計算機

https://www.youtube.com/watch?v=I5kj-YsmWjM

Build this JS calculator in 15 minutes!

心得與考試重點

  1. LIST條列, UL=UNORDERED LIST,OL=ORDERED LIST,BUTTON按鈕, CLICK按下, ONCLICK事件
  2. 網頁的命令,大小寫都可以。
  3. <button onclick="clearDisplay()">刪</button>
  4. SCRTPT區段有三個自訂的函數
  • 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";} }
  • 留言

    這個網誌中的熱門文章

    張岳宸Python_Javascript網路執行_EXCEL_IRR二分法

    張岳宸學會HTMI與CSS與嵌入影片等

    劉任昌整合開發環境IDE的Jupyter編輯Python程式碼