Hey guys. So right now I'm able to execute javascript code on my website without the use of <script> tags. Example: <body onload=alert("cool");></body> What I want to be able to do is insert an external javascript file located at another website using JavaScript code (not script tags). How can this be done? Thanks
You could use Server Side Includes or PHP's include() function to embed the external JavaScript into your pages, but, of course, you'd still have to surround the code with <script> tags in order for it to work. If you were trying to conceal the fact that you are using an external JavaScript file from your users, it would do the trick, although the other site would still show your usage in their server logs. On the whole, it seems like more effort than it would be worth.