Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save pzzrudlf/9a8ceefa55c2d61a9ce2 to your computer and use it in GitHub Desktop.

Select an option

Save pzzrudlf/9a8ceefa55c2d61a9ce2 to your computer and use it in GitHub Desktop.
关于form表单底下 button自动提交表单的问题
今天遇到一个很恶心的问题,form表单底下的button按钮标签 每次点击 都会将表单自动提交,根本就起不到一个按钮的作用了,郁闷半天,搜索半天,终于顿悟,下面上来解决办法。
1 经过测试 将button标签这只上 type="button"的属性 即可解决问题
2 用<input type="button"> 标签也可以解决问题
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment