preventdefault

-
To prevent the form submission from refreshing the page , you must use the preventDefault function .
为了避免提交表单时刷新页面,您必须使用preventDefault函数。
-
To access the preventDefault function , you must pass the handler event through as a parameter and use it to access the function .
要访问preventDefault函数,您必须传递处理函数(即使作为一个参数)或者使用它访问该函数。