java - Retrieving a variable from ahref or onclick load to the same page -


i trying pass variable using onclick or href , load variable same page further manipulation. below code.

<form id= "frm1" action="index.jsp" method="post"/> <c:foreach items="${mybean.flag}" var="element"> <a href="javascript:void(0);" onclick="sub(${element.case});return false;">${element.case}</a> 

appreciate time in advance.

thanks

missing quotes.

onclick="sub('${element.case}');return false;" 

Comments

Popular posts from this blog

.htaccess - First slash is removed after domain when entering a webpage in the browser -

Automatically create pages in phpfox -

c# - Farseer ContactListener is not working -