1.e.preventdefault() 

2.

<form action="#" ref="form" target="testif" onSubmit={this.submit}>
<label htmlFor="title">ToDoList</label>
<input type="text" ref="title" name="title" placeholder="添加ToDo" required="required" autoComplete="off" />>
<iframe name="testif" style={{ "display": "none" }}></iframe>
</form>

相关文章:

  • 2022-12-23
  • 2021-07-04
  • 2022-12-23
  • 2021-07-22
  • 2022-12-23
  • 2022-12-23
  • 2021-10-03
猜你喜欢
  • 2022-02-27
  • 2022-12-23
  • 2021-04-14
  • 2022-12-23
相关资源
相似解决方案