button causing page to reload

后端 未结 2 774
星月不相逢
星月不相逢 2021-01-26 03:38

I am using html and jquery on my page.

In my html i have one button which when clicked will fire one function.

When page loads i call main function in document r

2条回答
  •  北恋
    北恋 (楼主)
    2021-01-26 03:54

    by default BUTTONS are of type SUBMIT, try this instead

    
    

提交回复
热议问题