10
10

More than 5 years have passed since last update.

jQueryでポップアップブロックを回避して新windowにformの値を送りたい

Posted at

フォームの値を別ウィンドウに送りたい場合
$("form").attr("target", "_blank");
を使うと、ポップアップブロックにかかってしまうので、
その回避方法

window.open("","newwin");
$("form").attr("action", "開きたいURL");
$("form").attr("target", "newwin");
$("form").submit();

一旦新しいウィンドウを開いてから
そこにフォームを送る

10
10
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
10
10