Heim  >  Fragen und Antworten  >  Hauptteil

javascript - chrome关闭当前页面

chrome关闭当前所在的tab页,当前tab页并不是由js打开,因此调用window.close(),chrome会报js只能关闭由它打开的页面,使用别人说有效的方法 window.open('','_self',''); window.close(); 没有效果,询问能够使用的方法

大家讲道理大家讲道理2720 Tage vor488

Antworte allen(2)Ich werde antworten

  • 阿神

    阿神2017-04-11 10:40:17

    关闭页面很怪吧?为什么有这种需求?

    建议做跳转吧.

    比如:
    window.location.href = 'about:blank';

    Antwort
    0
  • PHP中文网

    PHP中文网2017-04-11 10:40:17

    嗯,我现在也有这个问题了,网上的回答都试过了,还是不好使....请问你解决了么?

    Antwort
    0
  • StornierenAntwort