简体   繁体   中英

Problem with Php Javascript Multistep Form

I have a problem with a php multistep form which should normally switch between different steps/forms in one single page.

However, when I click on the first "Next" button , instead of sliding to the next element, the page refreshes and displays the first step/form .

<button class="firstNext next">Next</button>

I hope someone can help me. Below are the CodePen references:

Debug CodePen : https://cdpn.io/ibx/debug/KKMzjJQ/PNrvYKqamoKM
Code: CodePen : https://codepen.io/ibx/pen/KKMzjJQ

Thank you for your help!

我已将代码更改为此,并且有效!
nextBtnFirst.addEventListener("click", (event) => { event.preventDefault();

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM