用户输入字段可以更好地使用DIV或仅计算公式的网页表单? [关闭]

I want to have 6 input fields in a webpage. If the user presses a button the 6 fields expand to 7,8, 9, or 10 fields. The fields are editable and come with a preset value. With the input from the user (or the preset values) a final value is calculated via a formula.

  1. Is it better to use a form for the fields or DIVs?
  2. Should I use JavaScript or something else I am not thinking about yet?
  3. Should I use AJAX when getting the values or is it not needed in this case?
  4. I thought about using an excel like editor made with jQuery https://github.com/mleibman/SlickGrid/wiki/Examples but it seems overkill for my needs plus I would need to edit a lot of it since I want a simple display of the fields.

I would use a form as you're asking the users for their data to be input. This will also trigger the keyboard on mobile/tablet devices if you're also targeting those platforms.

Javascript is fine for this, unless you want to hide the formula you're using (as they will be able to see it if they view your source).

Do you need to use AJAX? Are the pre-populated values going to change that much? If not, then no, it's just adding extra work when you could just have an array of values.