form 禁止跳转

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>
原文地址:https://www.cnblogs.com/nns4/p/10077194.html