In theory, you could put the URL of a .js file in there and be good to go, but I feel hesitant to ship a questionnaire like that just in case something goes wrong with the server hosting that URL. I prefer to download the .js file to my computer and place it in my questionnaire's graphics folder and then reference it like this:
<script src="[% GraphicsPath() %]myfile.js"></script>
Of course, different libraries may come with different licensing rules. Be sure to comply with the rules of use for any library you are interested in adding to your questionnaire.