<script type="text/javascript">
document.getElementById('button1').onChange = function () {
document.getElementById('hidden_field_id').value = document.getElementById('span_id').innerHTML;
}
</script>
More Related Contents:
- How to store objects in HTML5 localStorage
- Invoking JavaScript code in an iframe from the parent page
- Capture HTML Canvas as gif/jpg/png/pdf?
- Adjust width and height of iframe to fit with content in it
- Disabling browser print options (headers, footers, margins) from page?
- How to get numeric value from a prompt box? [duplicate]
- How to set value of input text using jQuery
- How do I get the information from a meta tag with JavaScript?
- getElementById() returns null even though the element exists [duplicate]
- javascript – shuffle HTML list element order
- How to dynamically create ‘@-Keyframe’ CSS animations?
- Check Ctrl / Shift / Alt keys on ‘click’ event
- Make anchor link go some pixels above where it’s linked to
- How to mute all sound in a page with JS?
- How to resize html canvas element?
- Nesting quotes in JavaScript/HTML
- jQuery vs document.querySelectorAll
- How to display div after click the button in Javascript? [duplicate]
- Focus Input Box On Load
- Looping through files for FileReader, output always contains last value from loop
- HTML5 callbacks?
- img onload doesn’t work well in IE7
- JavaScript: Get image dimensions
- Large dynamically sized html table with a fixed scroll row and fixed scroll column
- display HTML page after loading complete
- How did YouTube create a fluid video player?
- Best way to do a split pane in HTML [closed]
- How does HTML tags work inside script tag?
- Convert JavaScript variable value to csv file
- Chrome Extension get selected text