What is the point of using an ID attribute in a script tag?
dom, html, javascript
Solution
The `id` is just another accessor of the `<script>` tag inside the DOM tree. You could in theory use `document.getElementById()` to retrieve the `<script>` node and delete it or add other attributes (though I don't believe you can modify the `src` attribute once it has loaded in the DOM). The `id` isn't required for those operations though -- it could have been accessed by any DOM function such as `getElementsByTagName("script")` as well.
If you do need to access the `<script>` tag with DOM manipulations, the `id` makes it just a little easier. Otherwise, there is little benefit1.
1That is sort of true of adding an `id` attribute to any DOM node, though nodes affecting presentation can also benefit from CSS targeting the `id`, unlike a `<script>` tag...
Problem
Basically what I am asking is what is the point of giving my script tags an id attribute? Can the routines inside of them be called or referenced differently because of this identification? Could this cause any problems making the script/page act funny?