Specific ideas :
e.detail.value Will get all the information in the form input Value of , So we get each one input Value of
Again data Assign values

example :

<form bindsubmit="submit"> <view wx:for="{{model}}" wx:key="{{index}}"> <input
name="name{{index}}" placeholder="name"></input> <input name="sex{{index}}"
placeholder="sex"></input> </view> <button form-type="submit"> Submit </button> </form
>
js:
Page({ data: { model:[ {id:0,name:null,sex:null}, {id:1,name:null,sex:null} ] }
, submit:function(e){ let model = this.data.model; let name = e.detail.value;
// Get form All in input Value of console.log(name); var i=0,j=1,k=0; for(i=0,j=0;i<model.
length;i++,j++){ var n = "name"+i; var s = "sex"+i; console.log(name[n]);
console.log(name[s]); model[i].name = name[n]; model[i].sex = name[s]; } this.
setData({ model:model }); } })
console.log(name):

Got every one input Of name And its value , Note that the array order is based on the name Of ASCII To sort , So it is not feasible to traverse the assignment directly . Adoption key look for value The way
submit:function(e){ let model = this.data.model; let name = e.detail.value;
console.log(name); var i=0,j=1,k=0; for(i=0,j=0;i<model.length;i++,j++){ var n =
"name"+i; // input name var s = "sex"+i; // input name console.log(name[n]); console.
log(name[s]); // name[sex0] name[sex1] model[i].name = name[n]; model[i].sex =
name[s]; // model[0].sex = name[sex0] // model[1].sex = name[sex1] } this.
setData({ model:model }); },

Technology
©2020 ioDraw All rights reserved
Java exercises 1: Simply define a car class New photo album app launched by Microsoft : Using cross platform framework React Native to write Chapter two Fundamentals of programming Programming exercises pandas Time order of webpack Code segmentation import()Vue slot slot: Default slot , Named slot , Scope slot Fundamentals of data analysis ——R language ( Processing missing values )C++ Implementation of matrix meteor shower effect PostMan Advanced Usage , Interface MD5+Secret autograph Sign The 12th Blue Bridge Cup B group C/C++ Provincial competition