remove previous event handler code example Example: remove a function added to eventhandler element.removeEventListener(type, handler);