How to return an element to its original state with Javascript?

After Declaring a Javascript function on an Html Element which is to be invoked when an event takes place, i want to add another event listener which is event like onmouseout and then the html element will return to its original form i.e to its former state.

I tried creating another Function() adding “document.getElementById(“”)innerHTML = ” something like that. The thing is I don’t even know how to do it please help me out here, I need detailed explanation please.