Jump to content

Linking javascript dynamically


dpacmittal

Recommended Posts

Is it possible to link javascript dynamically. I mean, like this:

 

<script type="text/javascript>
var source= location.href+"abc.js";
</script>
<script src=source></script>

 

 

I tried the above code but it didn't work. I tried using eval() but it still didn't work. Anyway we can make that work? Help me guys.. this is important.

Link to comment
https://forums.phpfreaks.com/topic/157700-linking-javascript-dynamically/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.