You need a way to refer your script by. How else do you expect to know which script you want? If you only have one script, you could always do
var myScript = document.getElementsByTagName("script")[0];
to get a DOM element of the first script on your page. Or you could use jQuery and loop through your script to do something with each:
$("script").each(function() {
alert($(this).html());
});