簡體   English   中英

捕獲用戶輸入並將其存儲為 object javascript

[英]capture user input and and storing it as an object javascript

我想知道是否有人可以提供幫助。 將用戶輸入捕獲和存儲為 object 的最佳/正確方法是什么? 我有一個包含大約 10 個輸入字段的表單,我想將信息捕獲並存儲為 object。 I know about function constructors but i understand it is not good practice to create a constructors with lots of parameters, I also know about prototype inheritance but again i understand that it is not good practice to use prototype inheritance to add new variables to an object already通過構造函數 function 創建。 幾個月來,我斷斷續續地使用各種在線資源學習 JS,但我的 JS 知識仍然存在很大差距。 任何幫助/建議將不勝感激

我想知道是否有人可以提供幫助。 將用戶輸入捕獲和存儲為 object 的最佳/正確方法是什么? 我有一個包含大約 10 個輸入字段的表單,我想將信息捕獲並存儲為 object。 I know about function constructors but i understand it is not good practice to create a constructors with lots of parameters, I also know about prototype inheritance but again i understand that it is not good practice to use prototype inheritance to add new variables to an object already通過構造函數 function 創建。 幾個月來,我斷斷續續地使用各種在線資源學習 JS,但我的 JS 知識仍然存在很大差距。 任何幫助/建議將不勝感激

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM