I have a for loop on a JSP page to display a div containing a div which has a few data. I want the inner div to be clicked and the values to be passed to the controller.
<for>
<div>
<div>
<span>data</span>
</div>
</div>
</for>
How can i implement this functionality to make the entire div clickable and capture the data thats there in the DIV.
you can try this
that code will be show value of span in div element.
don’t forget you must use jquery to access this function,
if you want send to controller you can using $.ajax() request and response to server
and in server you get params
data