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

html - How to set bootstrap input responsive width? -

javascript - Highchart x and y axes data from json -

javascript - Get js console.log as python variable in QWebView pyqt -