• Welcome to Baben's blog that year. I'm glad to meet you at the right age!
  • Due to the theme, the QQ login partner displays the default avatar in the comments. Please go to the personal center to upload the avatar again.

Solve the problem that clicking button in vue will refresh the page

Code Notes barben Five years ago (October 12, 2019) 4830 views 0 comments

After taking a look at the code, I still wonder when the button has a default click event?

Finally, I found that the problem was in the form!

 <form> <button>OK</button> </form> <!--  Using the button tag in the form may cause the page to refresh. But as long as the input tag is changed, there is no problem! --> <form> <input type="button" value="OK"> </form>

 


Eight blogs that year, we have been
If the author does not indicate that it is an original article, please indicate the link and source of this article for reprinting
Solve the problem that clicking button in vue will refresh the page- https://www.barben.cn/code/612.html
Like( six )
Post my comments
Cancel comment
expression Mapping Bold Strike through Center Italic

You need to bring your nickname and email with you in the review of Eight Books that year!

  • Nickname (required)
  • Email (required)
  • website