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?

F12のConsoleでJSコードを実行する裏技

0
Posted at

Consoleの>右側を一度クリックし、先ほどのコード全体を貼り付けてEnterを押します。

初めてConsoleへ貼り付ける場合、Chromeが警告を表示して貼り付けを拒否することがあります。その場合は以下の手順です。

  1. Consoleの>右側をクリック
  2. キーボードで次を手入力
allow pasting
  1. Enterを押す
  2. 先ほどのコード全体をコピー
  3. Consoleへ貼り付け
  4. Enterを押す

実行後、DevToolsを閉じるか画面側を見ると、反映されるはずです。

複数行コードなので、途中ではなくコード全体を一度に貼り付けてください。Console上で改行したい場合はShift + Enterですが、一括貼り付けなら最後に通常のEnterだけで実行できます。

元に戻す場合は、画面を再読み込みするだけです。

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?