Create Javascript eraser with Touchevents

I have an online iPhone web app drawing application, and I need help creating an eraser, so I can erase whatever I drew, etc. I do not know how to create one. Can someone please help me? It must have something like and event listener for touchmove or end or start, so it can work with iPhone/iPad. Thanks!