Assuming you’re not using jQuery or some other library that makes this sort of thing easier for you, you can just use the element’s innerHTML property.
document.getElementById("content").innerHTML = "whatever";
More Related Contents:
- How to get 100% ADA compliance result in accessibility checker website https://webaccessibility.com? [closed]
- jQuery doesn’t give a proper output, but gives these [closed]
- fixing slider on my website [closed]
- contenteditable change events
- Use HTML5 to resize an image before upload
- Sorting options elements alphabetically using jQuery
- HTML Table to Excel Javascript
- What is the difference between the different methods of putting JavaScript code in an ?
- HTML5 check if audio is playing?
- Can I get image from canvas element and use it in img src tag?
- Is it possible to access Shadow DOM elements through the parent document?
- How to get all checked checkboxes
- Reset select value to default
- How to get all the applied styles of an element by just giving its id?
- How to develop Desktop Apps using HTML/CSS/JavaScript? [closed]
- Counting and limiting words in a textarea
- Writing file to desktop using HTML5 FileSystem API
- css position absolute making the textbox go down
- Proper way to reset a GIF animation with display:none on Chrome
- How can I prevent refresh of page when button inside form is clicked?
- Javascript Marquee to replace tags
- Passing JSON data from php to html-data attribute and then to Javascript
- iframe Auto Adjust Height as content changes
- Firefox Web Console Disabled?
- Is it possible to make input fields read-only through CSS?
- copying the value of a form’s file input field to another form’s input field
- Freeze Header until Irrelevant (HTML, CSS and JS)
- How can I fix Highcharts error #13?
- How to delete an HTML element inside a div with attribute contentEditable?
- Bootstrap Dropdown menu is not working