0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

jquery非対応のWebページのコンソールでjqueryを使う

Last updated at Posted at 2022-01-03

ひと様のサイトのコンソールで jquery を使おうとして怒られる事ありますよね。
よく見ると対象ページで jquery を使っていなかったりします。
1.png

そんな時はコンソールから直接 jquery を突っこんでしまいましょう。

var script = document.createElement('script');
script.src = "https://ajax.googleapis.com/ajax/libs/jquery/1.6.3/jquery.min.js";
document.getElementsByTagName('head')[0].appendChild(script);

これでjqueryの機能が使えます。
2.png

参考:https://stackoverflow.com/questions/31912136/each-is-not-a-function

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?