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?

1
  • 2
    Possible duplicate of this question Commented Jun 12, 2017 at 8:30

1 Answer 1

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);
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.