How to get a currency format in particular input field by using onkeyup event.

How to get a currency format in particular input field by using onkeyup event in web application. Plugin is not recommended.