Ok。私はこの質問が10年以上答えられていないのを見てきました..
1 回のボタン呼び出しでポップアップを送信して閉じるにはどうすればよいですか。
提案はこのように実行されます。
function saveNClose()
{
  document.form.submit();
  self.close();
}
this doesn't work because the submit has a redirect, and the self.close is never reached.
function closeLaterNSaveNow();
{
  setTimeout("window.close()",5000);
  document.form.submit();
}
same problem..  the close is never called because the script for the page is gone.
function closeNowNSubmit()
{
  self.close(); 
 document.form.submit();
}
the window closes, but nothing gets saved.  server doesn't even get notified of anything..
<input class='btn btn-success' disabled='disabled' id='SubmitFinal' onclick='closeWindow()' type='submit' value='Finish'>
Well then there's no validation of the data.  it submits before the function is called.
誰でもこれを解決できますか?2002 年にさかのぼる同じ解決策と、今月のものもありました。私は引き続き見ますが、誰かがそれを釘付けにし、誰かがここで答えてくれることを願っています