You need a placeholder element for your output. Then set the innerHTML for that element:
<div id='answer'></div>
then:
document.getElementById('answer').innerHTML = "answer is:" + yourdata
More Related Contents:
- document.write() overwriting the document?
- What is the correct way to write HTML using Javascript?
- How to read with JavaScript [closed]
- 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]
- Stop embedded youtube iframe?
- 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?
- 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?
- event.clipboardData.setData in copy event
- img onload doesn’t work well in IE7
- JavaScript: Get image dimensions
- display HTML page after loading complete
- Passing parameters to a JQuery function
- Validate Dynamically Added Input fields