<HTML>
<HEAD>
<TITLE>Add DIV Dynamically to web page using Java Script</TITLE>
<script>
function addDiv()
{
var ele=document.createElement('div');
ele.setAttribute('id','element');
ele.setAttribute('style','display:block;border:1px solid;height:20px');
document.body.appendChild(ele);
document.getElementById('element').innerHTML="hi";
}
</script>
</HEAD>
<BODY>
<input type="button" name="cmd" value="Add DIV" onClick="addDiv()"/>
</BODY>
</HTML>