【发布时间】:2020-07-28 15:20:52
【问题描述】:
渲染此表单时,我收到错误
<tr> cannot appear as a child of <form>.
在浏览器控制台中。我该如何摆脱它?
<form id='works_input_form' onSubmit={handleSubmit}>
<tr className='text-center'>
<td>
<div className='form-group'>
<textarea
className='form-control'
id='title'
rows='1'
cols='26'
placeholder='Name'
required
onChange={handleTaskChange}
></textarea>
</div>
</td>
<td>
<div className='form-group p-2'>
<textarea
className='form-control'
id='title'
rows='1'
cols='26'
placeholder='Subject'
required
onChange={handleSubjectChange}
></textarea>
</div>
</td>
</tr>
</form>
【问题讨论】:
-
用
table包装它。