Hello Eric,
After I
test the "document.execCommand('undo', false, null)" method, I find it works well in text-oriented HTML elements when you want to roll back what a user has done. Now I am eager to know how to undo the user's operation using Javascript. For example, in a web page which is used for writing questions for a quiz, a user will do from scratch when he logged on and he might take the following steps:
1) Press a select element to choose the nubmer of answers for the first question.
2) Create a table on the fly whose rows are equal to the previous selected number plus 1.
3)Fill in the question and its answers.
4)Generate a "Next" button on the fly automatically when he is about to input the last answer.
5)Press the "Next" button to write the second question.
How can I afford a list A to let the user undo the above operation and a list B redo these operation step by step? In other words, how can I implement this functionality using Javascript just like what we do in Microsoft's Excel?
Thanks in advance!
Regards, Ailsa Cape