how to change div content in javascript?
Its very easy to change the contents of div in javascript. Just get the object of div using getElemementbyID() or getElementbyName() and use innerHTML property with the new value.
divObj = document. getElementbyID("mydiv");
divObj.innerHTML = '<p>This is a html code</p>';
One important thing to note is, your div should have loaded after all the images. If not it wont work.
Similar Posts:
- iframe innerHTML value from textarea
- A Simple WYSIWYG Editor in Javascript
- Create selected text to hyperlink in Javascript
- how to check if image loaded or not in javascript?
- iFrame in javascript wont work in Firefox [solved]
- How to post source code in Wordpress posts?
- how to get selected textarea value using javascript
- Free Markup BBCode Editor in Javascript
- Free Markup TextArea HTML Editor in Javascript
- Displaying HTML code in Wordpress Posts!

