Redirecting a .js file

Is it possible to redirect a .js file like a html page?
LVL 4
racastillojrAsked:
Who is Participating?
 
leakim971PluritechnicianCommented:
you can put it in the head on the fly :

var scr = document.createElement("script");
scr.src = "path/to/script.js";
document.getElementsByTagName("head")[0].appendChild(scr);

Open in new window

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.