I'm not sure why would you do this, however the answer is YES it is possible to pick the script
tag using Element Selecting, with no id #
nor class .
prefixes, just like $('span.demo>script')
or $('span.demo script')
sure you can omit the span word and write it like $('.demo...)
.
As shown in this PHP Fiddle - hit run or F9 to execute - I was able to pick the script tag and alter its inner html (or text) - check this script element with the dev tool inspecter - but I couldn't execute the new injected function myColor()
as you can see in this image:

Code:
<?php
echo '<span class="demo"><script>alert("My original span next");</script></span>';
?>
<script>
var $html = "myColor();";
$('span.demo>script').html($html);
function myColor(){
$('span.demo').css({'background-color':'#FBB','border-color':'red'});
}
</script>
EDIT:
Alternatively you can give that script
tag an id
attribute and pick it directly, just like in this JS Fiddle again check the span.demo
with the dev tool inspector. check these two links for more information:
What is the point of using an ID attribute in a script tag?
Giving the script tag an ID