dpes8693 / frontend-mentor-program-1rd

前端培訓
0 stars 1 forks source link

汪宗諺_HW7&Question #55

Open DarkShadow9321 opened 2 months ago

DarkShadow9321 commented 2 months ago

HW7:https://darkshadow9321.github.io/APItest/ Question:如果用js為儲存資料的話。那html的script的內容是要寫在html中還是js裡面會比較好?

dpes8693 commented 2 months ago
dpes8693 commented 2 months ago

HW7:https://darkshadow9321.github.io/APItest/ Question:如果用js為儲存資料的話。那html的script的內容是要寫在html中還是js裡面會比較好?

以目前小作品來說,可以開一個單獨的js檔案 在html引入該js 呼叫變數即可

至於大專案實戰上會用框架&套件協助資料儲存; 至於很大量的資料都是靠API從DB拿