0

I want to know , How to include External JavaScript into current page using developer console.

I am having static plain html/js i want to test it with several js libraries as well as css in it. without adding in .html file or i am from remote machine.

so how do achieve it using Developer console?

Newbie
  • 19
  • 5
  • 2
    Possible duplicate of [this question](https://stackoverflow.com/questions/5282228/include-javascript-file-in-chrome-console) – jrenk Jun 12 '17 at 08:30

1 Answers1

1

You can try this to inject your script into HTML DOM

inject = document.createElement('script');
inject.src = "https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js";
document.getElementsByTagName('head')[0].appendChild(inject);
Mohideen bin Mohammed
  • 18,813
  • 10
  • 112
  • 118