I have a div with id xyz.Now i have avariable which has some html code like follows
var mycode = "<br>jajaj<b>jjja</b> ";
Now i want to replace content of div with this html code by using following
document.getElementbyid("xyz").innerHTML = mycode
This doenot work.I am not getting why.mycode is dynamicallly created in my code.
if i do simple document.getElementById("xyz").innerHTML ="some text" this works
getElementByIdjavascript is key sensitive