How do I use the second query method for the node I selected with JavaScript?

Asked 2 years ago, Updated 2 years ago, 38 views

I don't know if I'm going too complicated, but I'm going to do it with <i> tag on click instead of input of button or submit type in each form.
So what I'm planning is to use the .close method by holding the node element with onclick = "this..." and searching the tree to the nearest form.

<form action="./update" method="post" enctype="multipart/form-data">
 <tr>
   <td><input type="text" name="name" value=""></td>
   <td>
     <i onclick="this...?">mode_edit</i>
   </td>
 </tr>
</form>

It's like this if you shorten it's like this.

javascript jquery

2022-09-21 21:16

1 Answers

<i onlick=" jQuery(this).closest()"></i>

It's gonna be like this. Maybe...


2022-09-21 21:16

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.