i want to add dynamic javascript tag on the body
window.onload = function() {
var e = document.createElement('span');
e.innerHTML ='<script type="text/javascript">alert("hello");</script>';
document.body.insertBefore(e,document.body.childNodes[0]);
}
in the above example the javascript which is being loaded using innerHTML is not working
is there any workaround for this problem