Prova così:
alert(document.getElementById('nomecampo').value);