You need to break your inside script string into two pieces like this:
<script>
function asdf(){
document.getElementById('jkl').innerHTML = "<script>(another script goes here)</scr" + "ipt>"
}
</script>
Otherwise the HTML parser will think that the inner </script>
closing tag is closing the opening tag, and this will cause problems.