liz
0
Q:

how to get value inside span using javascript

var span_Text = document.getElementById("span_Id").innerText;

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

New to Communities?

Join the community