chrome浏覽器關閉標簽頁提示:Scripts may close only the windows that were opened by it.
解決辦法:通過open方法進行關閉。
open(location, '_self').close();