关闭当前页面
function closeWindow () var user agent=navigator.user agent; 用户代理. index of (Firefox )!=-1|||user agent.index of (' chrome '!=-1 ) window.location.href=' about : blank '; window.close (; } else {window.opener=null; window.open (',' _self ); window.close (; }或直接这样写(也可以在ie中关闭测试) :
在vue chrome中使用window.open(about:blank,(_self ) )时,某些chrome版本会智能地跳转到about:blank的空白页.