Best way to put some mask on input

Hi,

I need to put some “mask” in some fields… what`s the best way to do these?

Mask meaning: 00000-000 when user type: 36880987 show me: 36880-987

I have one Javascript to do that, but where I put on frappe? It’s on DocType JavaScript? If yes how can I do that?

using:
frappe.ui.form.on("Contato", "onload", function (frm) {

?