改进前
<table border="1">
<%= str %>
</table>
第一次运行没问题!但每刷新一次,表格重复一个,原因是.str没有修改!
改进后:
<table border="1">
<%= str %>
<% str=""; %>
</table>
把str每次都清空即可!
改进前
<table border="1">
<%= str %>
</table>
第一次运行没问题!但每刷新一次,表格重复一个,原因是.str没有修改!
改进后:
<table border="1">
<%= str %>
<% str=""; %>
</table>
把str每次都清空即可!