Javascript InnerHTML Erases Data In Form Elements

前端 未结 4 1847
灰色年华
灰色年华 2021-01-22 05:32

I have this form with a button that allows you to add fields to the form.

4条回答
  •  一整个雨季
    2021-01-22 05:46

    For one thing, try spelling it "label" not "lable". For another, you are setting the "innerHTML" property of d, so of course you are wiping out any existing values.

提交回复
热议问题