0

How to clear the last playing results before playing this time?

I have a rolling dice game with JavaScript. However, I face a problem when I would like to play it again, the last playing results is still there. Besides, at this playing time, the results will append after the playing results. How do I clear the last playing results before playing this time? https://code.sololearn.com/Wlc7869rmZOJ/?ref=app

9th Nov 2017, 2:09 PM
Agnès Lee
9 Respostas
+ 1
https://code.sololearn.com/WNPeuoixUKLt/?ref=app something like that? ;-)
13th Nov 2017, 2:56 PM
Daniel
Daniel - avatar
+ 2
Make a new function ResetTable() which do that, of course, empty first or delete "t" <table id="t"> <tr> <th>Total Points</th> <th>Times</th> <th></th> </tr> </table>
9th Nov 2017, 2:45 PM
Daniel
Daniel - avatar
+ 1
I've tried to add a function resetTable() to clear the previous result, but it does not work. Is there I should modify?
13th Nov 2017, 1:24 PM
Agnès Lee
+ 1
cool, thank you Daniel. I am studying what you wrote for me:-) but,what's wrong to my modified codes? why it doesn't work?
14th Nov 2017, 2:17 PM
Agnès Lee
0
You only need the first action in button will be make empty table
9th Nov 2017, 2:40 PM
Daniel
Daniel - avatar
0
I dont know, in this case I didnt checked. I think you have much code
14th Nov 2017, 4:14 PM
Daniel
Daniel - avatar
0
and much of the time is better begin something new than understand other code
14th Nov 2017, 8:47 PM
Daniel
Daniel - avatar
0
Maybe you need in each step, print out with an alert variables to check all is fine in each point
14th Nov 2017, 9:19 PM
Daniel
Daniel - avatar
0
Create a new element will not appear in the document until you append it to an existing element!
26th Nov 2017, 3:20 AM
Agnès Lee