I think this is what you want:
document.getElementById('tag-id').innerHTML = '<ol><li>html data</li></ol>';
Keep in mind that innerHTML is not accessible for all types of tags when using IE. (table elements for example)
More Related Contents:
- How do I detect a click outside an element?
- Convert Array to Object
- How to synchronize a sequence of promises?
- Only detect click event on pseudo-element
- How to overload functions in javascript?
- How to differentiate single click event and double click event?
- Does never resolved promise cause memory leak?
- Can I load an entire HTML document into a document fragment in Internet Explorer?
- How do I access the HTTP request header fields via JavaScript?
- Javascript: How to detect if a word is highlighted
- Execute an exe file using node.js
- How to show a spinner while loading an image via JavaScript
- Multiple calls to state updater from useState in component causes multiple re-renders
- Redirecting to a relative URL in JavaScript
- Is it any limit for POST data size in Ajax?
- Does JavaScript have undefined behaviour?
- How to set the image quality while converting a canvas with the “toDataURL” method?
- How to draw a polygon around a polyline in JavaScript?
- Get image preview before uploading in React
- How do you detect support for VML or SVG in a browser
- Node.js POST causes [Error: socket hang up] code: ‘ECONNRESET’
- javascript sorting array based on another array
- Checking for duplicate strings in JavaScript array
- Trigger CSS Animations in JavaScript
- Popstate on page’s load in Chrome
- Send form data using ajax
- dynamically call local function in javascript
- JavaScript this refers to window instead of object inside function
- Filter Array in Array by date between 2 dates
- How to apply both ValidationPipe() and ParseIntPipe() to params?