The simplest way is to set the new HTML content using:
document.open();
document.write(newContent);
document.close();
More Related Contents:
- Changing CSS Values with Javascript
- How to make page loaders/animations/transitions
- How can I tell if a DOM element is visible in the current viewport?
- Parse an HTML string with JS
- jQuery document.createElement equivalent?
- Browser detection versus feature detection
- How can I count text lines inside an DOM element? Can I?
- How to show Page Loading div until the page has finished loading?
- Prevent Page Load on Jquery Form Submit with None Display Button
- “Mixed content blocked” when running an HTTP AJAX operation in an HTTPS page
- Pass mouse events through absolutely-positioned element
- getAttribute() versus Element object properties?
- get the data of uploaded file in javascript
- How to get the HTML for a DOM element in javascript
- Refresh a Div that has a Google ad inside it
- How to find a parent with a known class in jQuery?
- Why aren’t some technically serializable input properties serializable?
- How do you listen / detect changes to an input value – when the input value is changed via javascript?
- Addeventlistener with ajax not working well
- Adding images to an HTML document with JavaScript
- how to assign javascript variable value to php variable
- Add an element to the DOM with JavaScript
- How to get the title of HTML page with JavaScript?
- How can I get all a form’s values that would be submitted without submitting [duplicate]
- How to properly unload/destroy a VIDEO element
- How can I detect a Scrollbar presence ( using Javascript ) in HTML iFrame?
- Cross-Origin resource sharing and file://
- How to get element by class name
- Test if an element can contain text
- Replacement for deprecated `keypress` DOM event