how to get value inside span using javascript
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>
Also in JavaScript:
- move an element into another jquery
- each function jquery stack overflow
- select 2nd td jquery
- angular add bootstrap
- jquery loop through list element
- how to run cypress
- javascript class constructor
- react router url params
- How to avoid scientific notation for large numbers in JavaScript?
- adding int and string in react props
- Material-ui account box icon
- how to send mail node.js
- js array into object
- difference between React Native and React
- javascript detect escape key pressed
- javascript x number of parameters
- update vue version npm
- vuetify event handler
- how to make and add to an array in javascript
- javascript map
- Displaying JSON data in Chartjs
- how to put firebase config in a sperate file react native
- Javascript compare two dates
- get random element from string array java