javascript - How to set table data as a variable in java that can be change dynamically? -


how can set table data variable in java, can change dynamically?

here @ place of "o positive", want set variable in java or javascript inside jsp page. so, table data keeps on updating dynamically.

what ways it?

settings.jsp

<tr>   <td class="text-left">o positive</td>   <td class="text-left">o+, a+</td>   <td class="text-left">o+</td> </tr> 

you can use kind of approach example

the html

<body data-customvalueone="${beanname.attrname}" data-customvaluetwo="${beanname.scndattrname}">     here regular page main content </body> 

the javascript

<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.js"></script> <script type="text/javascript">     jquery(function(){         var valuepassedfromjsp = $("body").attr("data-customvalueone");         var anothervaluepassedfromjsp = $("body").attr("data-customvaluetwo");          alert(valuepassedfromjsp + " , " + anothervaluepassedfromjsp + " values passed jsp page"); }); </script> 

hope help. please start learn more on area.
thank you


Comments

Popular posts from this blog

networking - Vagrant-provisioned VirtualBox VM is not reachable from Ubuntu host -

c# - ASP.NET Core - There is already an object named 'AspNetRoles' in the database -

ruby on rails - ArgumentError: Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true -