0

My form will submit data and get a result on the same page to the user for only viewing. The result will not save any where. my image form is here

As above image select 2 parameter which save on Db and 1 length which is temp .

On select length after submit.
On submit below table will show result in table as type ,volatage .,resultR,resultX,resultB to user.

length,resultR=lengthr,resultX=lengthx,resultB=length*b all three are temp array. user can do many time for result and shown row by row and on clear click all result will erase.

4

1 回答 1

0

I think one way to do it is to keep a div which acts as a container for all the results in the second table. You can the save the result you got from the submit and append that data to the second tables div.Something like this:

$("#second-table-div table").append('<tr><td>resultR : '+somevalue+'</td><td>...</td></tr>');

Once the user clicks 'clear' button, you can simply write a small jquery or javascript, something like this:

$('#clear').on('click',function(){
  $("#second-table-div").html('');
});
于 2016-01-29T08:04:19.203 回答