window.open popup getting blocked during click event

前端 未结 5 2025
刺人心
刺人心 2020-11-30 07:30

What I ultimately need to do is run an $.ajax() call and then after that is run, open a new window.

A use clicks on a \"Preview\" button that saves thei

5条回答
  •  时光取名叫无心
    2020-11-30 08:03

    const newWin = window.open(`${BASE_URL}`, 'expampleName')
    if (newWin) {
      newWin.onload = () => {
        const currentOpenWindow = newWin
        const href = newWin.location.href
      }
    }
    

提交回复
热议问题