错误写法:setTimeout(window.close(),5000);正确写法:setTimeout(window.close,5000);或者setTimeout(function(){window.close();},5000);