I have this code:
function render(str)
{
var main = document.createElement('div');
with(main.style)
{
//style stuff here
}
main.appendChild(document.createTextNode(str));
document.body.appendChild(main);
setTimeout(function(){
try{
document.body.removeChild(main);
} catch(error){}
},5000);
}
This render a message inside a div, an then hides after 5 secs.
How I can add a input text and image to this form? Since I'm not sure how I can do with pure JS.