<!DOCTYPE html>
<html>
<head>
<script type='text/javascript'
src='http://code.jquery.com/jquery-1.8.3.js'></script>
<script type='text/javascript'>
$(window).load(function(){
console.log(document.getElementById('code1').innerHTML);
});
</script>
</head>
<body>
<script id="code1" type="text/myjs">alert('hi')</script>
</body>
</html>