Use reset() Most of the browsers support it.
reset()
Usage:
document.getElementById("password").reset();