How can I dynamically download and run a javascript script from a javascript console?

前端 未结 3 875
死守一世寂寞
死守一世寂寞 2021-02-14 06:26

Is there a one-liner I could execute in a javascript console to download and execute a javascript script from a remote source?

I was looking to see if there was a nic

3条回答
  •  鱼传尺愫
    2021-02-14 06:57

    Well, it is quite simple to take a long javascript snippet and put it all together into one line :)

    This approach takes a few lines you could mix togehter into a oneliner (but i guess you are looking for a shorter solution). You will have to eval the contents of the two script tags to load Google AJAX libraries - that is all. You might need to do a call to get the first one though.

提交回复
热议问题