var span_Text = document.getElementById("span_Id").innerText;
console.log(span_Text)
<script type="text/javascript">
document.getElementById('button1').onChange = function () {
document.getElementById('hidden_field_id').value = document.getElementById('span_id').innerHTML;
}
</script>