I have a code like this:
var myscript = document.createElement('script');
myscript.setAttribute('src','codescript.js');
document.head.appendChild(myscript);
The result is:
<head>
<script src="codescript.js"></script>
</head>
Well, how do I change the code.I'm hoping to put the script into a DIV tag which will be more specific.
For example:
<head></head>
<body>
<div id="this">
<script src="codescript.js"></script>
</div>
</body>