There is a plugin for that, jquery-formatcurrency.
You can set the decimal separator (default .
) and currency symbol (default $
) for custom formatting or use the built in International Support. The format for Bahasa Indonesia (Indonesia) - Indonesian (Indonesia) coded id-ID looks closest to what you have provided.