Inside the html form tag, we faced a situation where we had to implement a button independent of the form.

Asked 2 years ago, Updated 2 years ago, 25 views

I'd like to implement the same function as in the picture above.

I'm trying to implement function number 2, but I don't know how to do it.

I'd like some advice.

html javascript

2022-09-22 20:45

1 Answers

Even if you use button, it is fine as long as the type is not submit

Button/button (Markup became right away, so I omitted < >) Buttons are made even if you leave them like this

Now, when you click Add, you can create a function to add to the list and call it like button onclick= function()

Ahref actually looks similar to Button if you give it a border style, so there's a way like that


2022-09-22 20:45

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.