Volendo poi mettere document.getElementById('mio') .checked=true anche dentro alla funzione getRate