Internal/External Script Test

This is a test of current browsers to see if they allow the same script block to have both an external reference and child script content that executes. If you see an alert box with the words "internal script 1", this means that it defaults to the child contents; if you see an alert box with the words "external script", this means that it defaults to the external reference; if you see both, this means that it allows both to execute. There is also an addition script block with only child contents, to serve as a control, which has an alert box with the message "internal script 2".

Here is the code:


         
            <script src='internal-external-test.js' type='text/javascript'>
               alert("internal script");
            </script>

            <script type='text/javascript'>
               alert("internal script 2");
            </script>