name写成 "arr[]"的形式就可以了
作业管理
button不能放在form里面,不然就会提交,不知道为什么
SO 里问了一下,回答是
The <button>
element is a submit button by default. You can change this with the type="button"
attribute, which makes it do nothing by default, or calling preventDefault
on the event. But I'd go with the attribute since then your intention is semantically clear without actually running the script.