Clearing using jQuery
Easy: you wrap a <form> around the element, call reset on the form, then remove the form using .unwrap(). Unlike the .clone() solutions otherwise in this thread, you end up with the same element at the end (including custom properties that were set on it). Tested and working in Opera, Firefox, Safari, Chrome and IE6+. … Read more